本文整理匯總了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]
});
});
示例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();
}));
示例3: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule.withRoutes([]),
NbThemeModule.forRoot(),
NbLayoutModule,
NbSearchModule,
],
});
TestBed.createComponent(NbLayoutComponent);
fixture = TestBed.createComponent(NbSearchComponent);
searchComponent = fixture.componentInstance;
fixture.detectChanges();
});
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
HttpClientModule,
AngularFontAwesomeModule,
BrowserAnimationsModule
],
declarations: [
AppComponent
],
providers: []
}).compileComponents();
}));
示例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();
});
示例6: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
HttpClientModule,
RouterTestingModule.withRoutes([])
],
providers: [
UiStore,
UiStore,
TokenStorage,
AuthenticationService,
ClientsService,
ChannelsService,
]
});
});
示例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);
});
示例9: async
async(() => {
TestBed.configureTestingModule({
imports: [
SyndesisCommonModule.forRoot(),
SyndesisStoreModule,
RouterTestingModule.withRoutes([]),
ModalModule.forRoot(),
TooltipModule.forRoot(),
TabsModule.forRoot(),
NotificationModule,
PatternflyUIModule,
IntegrationListModule
],
declarations: [IntegrationListPage]
}).compileComponents();
})
示例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();
}));