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


TypeScript TestBed.overrideModule方法代碼示例

本文整理匯總了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();
    }));
開發者ID:gravitonian,項目名稱:alfresco-ng2-components,代碼行數:29,代碼來源:card-view.component.spec.ts

示例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 ]
		}
});
	});
開發者ID:eddygta17,項目名稱:loklak_search,代碼行數:21,代碼來源:media-wall-query.component.spec.ts

示例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())
開發者ID:thorn0,項目名稱:angular,代碼行數:1,代碼來源:jit_summaries_integration_spec.ts

示例9: beforeEach

 beforeEach(() => {
   TestBed.overrideModule(NgbTypeaheadModule, {set: {exports: [NgbHighlight]}});
   TestBed.configureTestingModule({declarations: [TestComponent], imports: [NgbTypeaheadModule.forRoot()]});
 });
開發者ID:Chenlevin,項目名稱:ng-bootstrap,代碼行數:4,代碼來源:highlight.spec.ts


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