當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript testing.xit函數代碼示例

本文整理匯總了TypeScript中angular2/testing.xit函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript xit函數的具體用法?TypeScript xit怎麽用?TypeScript xit使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了xit函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: xdescribe

xdescribe('AppComponent', function () {
  beforeEachProviders(() => [
    provide(APP_BASE_HREF, { useValue: '/' }),
    provide(ApplicationRef, { useClass: MockApplicationRef }),
    provide(ROUTER_PRIMARY_COMPONENT, { useValue: AppComponent })
  ]);

  it('should instantiate component',
    injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {

      return tcb.createAsync(AppComponent).then(fixture => {
        expect(fixture.componentInstance instanceof AppComponent).toBe(true, 'should create AppComponent');
      });
    }));

  xit('should have expected <h1> text',
    injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {

      return tcb.createAsync(AppComponent).then(fixture => {
        // fixture.detectChanges();  // need for a binding; we don't have one
        let h1 = fixture.debugElement.query(el => el.name === 'h1').nativeElement;
        expect(h1.innerText).toMatch(/angular 2 app/i, '<h1> should say something about "Angular 2 App"');
      });
    }));
});
開發者ID:nickbarnettworks,項目名稱:event-view,代碼行數:25,代碼來源:app.component.spec.ts

示例2: describe

    describe('universal truths', () => {
        it('should do math', () => {
            expect(1 + 1).toEqual(2);

            expect(5).toBeGreaterThan(4);
        });

        xit('should skip this', () => {
            expect(4).toEqual(40);
        });
    });
開發者ID:densitydesign,項目名稱:strumentalia,代碼行數:11,代碼來源:sanity.spec.ts

示例3: describe

describe('AppComponent', () => {
  xit('should say hello',
      injectAsync([ TestComponentBuilder ], (tcb: TestComponentBuilder) => {
        return tcb.overrideProviders(AppComponent, ROUTER_PROVIDERS)
            .createAsync(AppComponent)
            .then(fixture => {
              expect(fixture.nativeElement.textContent).toBe('Hello!');
            });
      }));

  it('should pass', () => expect(true).toBe(true));
});
開發者ID:jeffbcross,項目名稱:issue-zero,代碼行數:12,代碼來源:app.spec.ts

示例4: describe

describe('Color Picker', () => {
  let possibilities: Array<string> = [
    'red',
    '#f00',
    'f00',
    '#ff0000',
    'ff0000',
    '#ff000000',
    'ff000000',
    'rgb 255 0 0',
    'rgb (255, 0, 0)',
    'rgb 1.0 0 0',
    'rgb (1, 0, 0)',
    'rgba (255, 0, 0, 1)',
    'rgba 255, 0, 0, 1',
    'rgba (1.0, 0, 0, 1)',
    'rgba 1.0, 0, 0, 1',
    'hsl(0, 100%, 50%)',
    'hsl 0 100% 50%',
    'hsla(0, 100%, 50%, 1)',
    'hsla 0 100% 50%, 1',
    'hsv(0, 100%, 100%)',
    'hsv 0 100% 100%',
  ];
  xit('Possibilities should be CSS readable.', () => {
    possibilities.map((color: string) => {
      expect(Color.isValidCss(color)).toBeTruthy();
    });
  });
  it('...', () => {
    possibilities.map((color: string) => {
      console.log(Color.converter(color));
    });
  });
  xit('Static helpers', () => {
      Color.helpers.bound('32', 255);
  });
});
開發者ID:miguelramos,項目名稱:ng2-colorpicker,代碼行數:38,代碼來源:color.spec.ts

示例5: describe

describe('Application Shell', () => {
    var shell: AppShell;

    beforeEachProviders(() => {
        return [
          BlogService,
          provide(BlogRoll, { useValue: { }})
        ];
    });

    xit('Can be created', injectAsync([TestComponentBuilder], (tcb) => {
        return tcb.createAsync(AppShell)
            .then((fixture) => {
                fixture.detectChanges();
                let blogRoll = fixture.nativeElement.getElementsByTagName('<blog-roll>');
                expect(blogRoll).toBeDefined();
            });
    }));
});
開發者ID:krimple,項目名稱:angular2-unittest-samples-webpack,代碼行數:19,代碼來源:app-shell.spec.ts

示例6: describe

describe('some component', () => {
  xit('has a test', () => { throw 'This test will not run.'; });
  it('has another test', () => {
                             // This test will run.
                         });
});
開發者ID:0oAimZo0,項目名稱:Angular2Learning,代碼行數:6,代碼來源:testing.ts


注:本文中的angular2/testing.xit函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。