本文整理汇总了TypeScript中@angular/core/testing.expect函数的典型用法代码示例。如果您正苦于以下问题:TypeScript expect函数的具体用法?TypeScript expect怎么用?TypeScript expect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了expect函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: inject
inject([CheckmarkPipe], function(checkmarkPipe: CheckmarkPipe) {
expect(checkmarkPipe.transform(true)).toBe('\u2713');
expect(checkmarkPipe.transform(false)).toBe('\u2718');
})
示例2: inject
inject([MedjsAngularjs2FirebaseAppComponent], (app: MedjsAngularjs2FirebaseAppComponent) => {
expect(app.title).toEqual('medjs-angularjs2-firebase works!');
}));
开发者ID:juancarlosmaldonadobeltran,项目名称:medjs-angularjs2-firebase,代码行数:3,代码来源:medjs-angularjs2-firebase.component.spec.ts
示例3: inject
inject([AppComponent], (app: AppComponent) => {
expect(app).toBeTruthy();
}));
示例4: inject
inject([ChoicesService], (service: ChoicesService) => {
expect(service).toBeTruthy();
}));
示例5: expect
.then((fixture: ComponentFixture<any>) => {
let query = fixture.debugElement.query(By.directive(ChatComponent));
expect(query).toBeTruthy();
expect(query.componentInstance).toBeTruthy();
});
示例6: it
it("data should be three first items when page change", ()=> {
datatable.setPage(1,3);
datatable.ngDoCheck();
expect(datatable.data).toEqual([{id: 3, name: 'Poland'},{id: 1, name: 'Slovakia'},{id: 2, name: 'Czech'}]);
});
示例7: it
it('should create an instance', () => {
let component = new PostDetailComponent(fb, route, router, store, location);
expect(component).toBeTruthy();
});
示例8: it
it('should create the app', inject([AppComponent], (app: AppComponent) => {
expect(app).toBeTruthy();
})
示例9: inject
inject([TooltipService], (service:TooltipService) => {
expect(service.setTooltipData({y:'one'})).toBe('one');
expect(service.setTooltipData({tooltip:'tip'})).toBe('tip');
}));