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


TypeScript testing.RouterTestingModule類代碼示例

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


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

示例1: beforeEach

    beforeEach(() => {

        TestBed.configureTestingModule({
            declarations: [HomeComponent, InventurComponent, InventarComponent, BilanzComponent],
            providers: [
                InventurService,
                LoggerService,
                {
                    provide: QueryGatewayService,
                    useValue: jasmine.createSpyObj('QueryGatewayService', ['send'])
                }
            ],
            imports: [NgReduxModule, HttpClientTestingModule, CommandGatewayModule, RouterTestingModule.withRoutes(DEMO_APP_ROUTES)],
            schemas: [NO_ERRORS_SCHEMA]
        });
    });
開發者ID:haschi,項目名稱:dominium,代碼行數:16,代碼來源:inventur.service.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       RouterTestingModule.withRoutes([
         { path: '', redirectTo: '/lambdas', pathMatch: 'full' },
         { path: 'lambdas', component: LambdasComponent },
       ]),
       ListModule,
       FormsModule,
       AceEditorModule,
       ClickOutsideModule,
     ],
     declarations: [AppComponent, TimeAgoPipe, LambdasComponent],
     schemas: [NO_ERRORS_SCHEMA],
   }).compileComponents();
 }));
開發者ID:marynaKhromova,項目名稱:console,代碼行數:16,代碼來源:app.component.spec.ts

示例3: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule.withRoutes([]),
        NbThemeModule.forRoot(),
        NbLayoutModule,
        NbSearchModule,
      ],
    });

    TestBed.createComponent(NbLayoutComponent);

    fixture = TestBed.createComponent(NbSearchComponent);
    searchComponent = fixture.componentInstance;
    fixture.detectChanges();
  });
開發者ID:kevinheader,項目名稱:nebular,代碼行數:16,代碼來源:search.component.spec.ts

示例4: beforeEach

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule.withRoutes([]),
        ReactiveFormsModule,
        HttpClientModule,
        AngularFontAwesomeModule,
        BrowserAnimationsModule
      ],

      declarations: [
        AppComponent
      ],
      providers: []
    }).compileComponents();
  }));
開發者ID:AmitDebadwar,項目名稱:ProgramPractice,代碼行數:16,代碼來源:app.component.spec.ts

示例5: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        RouterTestingModule.withRoutes([]),
        NbThemeModule.forRoot(),
        NbLayoutModule,
        NbDatepickerModule.forRoot(),
      ],
      declarations: [NbDatepickerTestComponent],
    });

    fixture = TestBed.createComponent(NbDatepickerTestComponent);
    appRef = TestBed.get(ApplicationRef);

    fixture.detectChanges();
  });
開發者ID:kevinheader,項目名稱:nebular,代碼行數:16,代碼來源:datepicker.spec.ts

示例6: beforeEach

 beforeEach(() => {
     TestBed.configureTestingModule({
         imports: [
             HttpClientModule,
             RouterTestingModule.withRoutes([])
         ],
         providers: [
             UiStore,
             UiStore,
             TokenStorage,
             AuthenticationService,
             ClientsService,
             ChannelsService,
         ]
     });
 });
開發者ID:reisub0,項目名稱:mainflux,代碼行數:16,代碼來源:ui.store.spec.ts

示例7: beforeEach

  beforeEach(async(() => {

    TestBed.configureTestingModule({
      imports: [AppModule, RouterTestingModule.withRoutes([])],
      providers: [ProvidedService, MockBackend, BaseRequestOptions,
        {
          provide: Http,
          useFactory: (mockBackend: MockBackend, defaultOptions: RequestOptions) => {
            return new Http(mockBackend, defaultOptions);
          },
          useClass: Http,
          deps: [MockBackend, BaseRequestOptions]
        }
      ]
    }).compileComponents();
  }));
開發者ID:MarcosPrieto,項目名稱:Angular-AlbumStoreProductPage,代碼行數:16,代碼來源:product-description-html-uses-dynamic-albuminfo-imageurl.projects.spec.ts

示例8: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        HttpClientTestingModule,
        RouterTestingModule.withRoutes(routes),
      ],
      providers: [
        AlertService,
        UserService,
      ]
    });

    injector = getTestBed();
    service = injector.get(UserService);
    http_mock = injector.get(HttpTestingController);
  });
開發者ID:woocommerce-quiz,項目名稱:comixed,代碼行數:16,代碼來源:user.service.spec.ts

示例9: async

 async(() => {
   TestBed.configureTestingModule({
     imports: [
       SyndesisCommonModule.forRoot(),
       SyndesisStoreModule,
       RouterTestingModule.withRoutes([]),
       ModalModule.forRoot(),
       TooltipModule.forRoot(),
       TabsModule.forRoot(),
       NotificationModule,
       PatternflyUIModule,
       IntegrationListModule
     ],
     declarations: [IntegrationListPage]
   }).compileComponents();
 })
開發者ID:gnodet,項目名稱:syndesis,代碼行數:16,代碼來源:list-page.component.spec.ts

示例10: beforeEach

 beforeEach(async(() => {
   mockApiService = new MockApiService();
   TestBed.configureTestingModule({
     imports: [
       FilterModule.forRoot(),
       RouterTestingModule.withRoutes(config),
       SharedModule
     ],
     declarations: [ DefaultComponent ],
     providers: [
       MediaService,
       { provide: ApiService, useValue: mockApiService },
     ]
   })
   .compileComponents();
 }));
開發者ID:adriancarriger,項目名稱:pv-site,代碼行數:16,代碼來源:default.component.spec.ts


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