当前位置: 首页>>代码示例>>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;未经允许,请勿转载。