当前位置: 首页>>代码示例>>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;未经允许,请勿转载。