本文整理匯總了TypeScript中@angular/core/testing.TestBed.overrideModule方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript TestBed.overrideModule方法的具體用法?TypeScript TestBed.overrideModule怎麽用?TypeScript TestBed.overrideModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/core/testing.TestBed
的用法示例。
在下文中一共展示了TestBed.overrideModule方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
beforeEach(async(() => {
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [DynamicKendoDropdownListComponent]
}
});
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
DateInputsModule,
DropDownsModule,
InputsModule,
UploadModule,
DynamicFormsCoreModule
],
declarations: [DynamicKendoFormControlContainerComponent, DynamicKendoDropdownListComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicKendoFormControlContainerComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));
開發者ID:udos86,項目名稱:ng2-dynamic-forms,代碼行數:29,代碼來源:dynamic-kendo-form-control-container.component.spec.ts
示例2: beforeEach
beforeEach(async(() => {
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [DynamicIonicInputComponent]
}
});
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
NoopAnimationsModule,
TextMaskModule,
IonicModule,
DynamicFormsCoreModule
],
declarations: [DynamicIonicFormControlContainerComponent, DynamicIonicInputComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicIonicFormControlContainerComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));
開發者ID:udos86,項目名稱:ng2-dynamic-forms,代碼行數:28,代碼來源:dynamic-ionic-form-control-container.component.spec.ts
示例3: beforeEach
beforeEach(async(() => {
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [DynamicBootstrapInputComponent]
}
});
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
DynamicFormsCoreModule,
TextMaskModule,
BsDatepickerModule.forRoot(),
TimepickerModule.forRoot()
],
declarations: [DynamicBootstrapFormControlContainerComponent, DynamicBootstrapInputComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicBootstrapFormControlContainerComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));
開發者ID:udos86,項目名稱:ng2-dynamic-forms,代碼行數:28,代碼來源:dynamic-bootstrap-form-control-container.component.spec.ts
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
MdDatepickerModule,
MdIconModule,
MdInputModule,
MdNativeDateModule,
FormsModule
],
declarations: [
CardViewComponent,
CardViewItemDispatcherComponent,
CardViewContentProxyDirective,
CardViewTextItemComponent,
CardViewDateItemComponent
],
providers: [
CardViewUpdateService
]
});
// entryComponents are not supported yet on TestBed, that is why this ugly workaround:
// https://github.com/angular/angular/issues/10760
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: { entryComponents: [ CardViewTextItemComponent, CardViewDateItemComponent ] }
});
TestBed.compileComponents();
}));
示例5: beforeEach
beforeEach(async(() => {
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [DynamicPrimeNGInputComponent]
}
});
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
NoopAnimationsModule,
DynamicFormsCoreModule.forRoot(),
AutoCompleteModule,
CalendarModule,
CheckboxModule,
ChipsModule,
ColorPickerModule,
DropdownModule,
EditorModule,
InputMaskModule,
InputSwitchModule,
InputTextModule,
InputTextareaModule,
MultiSelectModule,
RadioButtonModule,
RatingModule,
SliderModule,
SpinnerModule
],
declarations: [DynamicPrimeNGFormControlContainerComponent, DynamicPrimeNGInputComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicPrimeNGFormControlContainerComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));
開發者ID:thanhdevapp,項目名稱:ng-dynamic-forms,代碼行數:42,代碼來源:dynamic-primeng-form-control-container.component.spec.ts
示例6: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
BrowserAnimationsModule,
MatDialogModule,
MatCheckboxModule,
StoreModule.provideStore(fromRoot.reducer),
FormsModule,
ReactiveFormsModule
],
declarations: [
MediaWallQueryComponent
]
});
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [ MediaWallQueryComponent ]
}
});
});
示例7: beforeEach
beforeEach(async(() => {
TestBed.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [DynamicMaterialInputComponent]
}
});
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
NoopAnimationsModule,
MatAutocompleteModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatIconModule,
MatInputModule,
MatRadioModule,
MatSelectModule,
MatSliderModule,
MatSlideToggleModule,
TextMaskModule,
DynamicFormsCoreModule
],
declarations: [DynamicMaterialFormControlContainerComponent, DynamicMaterialInputComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicMaterialFormControlContainerComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));
開發者ID:udos86,項目名稱:ng2-dynamic-forms,代碼行數:37,代碼來源:dynamic-material-form-control-container.component.spec.ts
示例8: expect
expect(() => TestBed.overrideModule(SomeModule, {add: {}}).compileComponents())
示例9: beforeEach
beforeEach(() => {
TestBed.overrideModule(NgbTypeaheadModule, {set: {exports: [NgbHighlight]}});
TestBed.configureTestingModule({declarations: [TestComponent], imports: [NgbTypeaheadModule.forRoot()]});
});