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


TypeScript testing.expect函數代碼示例

本文整理匯總了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');
 })
開發者ID:Adam-Meisen,項目名稱:angular.io,代碼行數:4,代碼來源:checkmark.pipe.spec.ts

示例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();
 }));
開發者ID:dmorosinotto,項目名稱:xe-ng2-jumpstart,代碼行數:3,代碼來源:app.component.spec.ts

示例4: inject

     inject([ChoicesService], (service: ChoicesService) => {
   expect(service).toBeTruthy();
 }));
開發者ID:petershafer,項目名稱:lunch-oracle,代碼行數:3,代碼來源:choices.service.spec.ts

示例5: expect

 .then((fixture: ComponentFixture<any>) => {
   let query = fixture.debugElement.query(By.directive(ChatComponent));
   expect(query).toBeTruthy();
   expect(query.componentInstance).toBeTruthy();
 });
開發者ID:ArnoldKrumins,項目名稱:rxjs-socket.io,代碼行數:5,代碼來源:chat.component.spec.ts

示例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'}]);
 });
開發者ID:Arthurisme,項目名稱:TimeMachineAlpha,代碼行數:5,代碼來源:DataTable.spec.ts

示例7: it

 it('should create an instance', () => {
   let component = new PostDetailComponent(fb, route, router, store, location);
   expect(component).toBeTruthy();
 });
開發者ID:chgc,項目名稱:practice-fb-group-forum,代碼行數:4,代碼來源:post-detail.component.spec.ts

示例8: it

 it('should create the app', inject([AppComponent], (app: AppComponent) => {
     expect(app).toBeTruthy();
   })
開發者ID:mquintal,項目名稱:a2-shopping-list,代碼行數:3,代碼來源:app.component.spec.ts

示例9: inject

 inject([TooltipService], (service:TooltipService) => {
     expect(service.setTooltipData({y:'one'})).toBe('one');
     expect(service.setTooltipData({tooltip:'tip'})).toBe('tip');
 }));
開發者ID:Kjuib,項目名稱:SuperheroUI,代碼行數:4,代碼來源:tooltip.service.spec.ts


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