Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [TestComponent, MockComponent(DSOSelectorComponent)],
providers: [
{ provide: NgbActiveModal, useValue: modalStub },
{
provide: ActivatedRoute,
useValue: { root: { firstChild: { firstChild: { data: observableOf({ item: itemRD }) } } } }
}
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
BasketValidationProductsComponent,
MockComponent(ProductImageComponent),
MockComponent(ProductInventoryComponent),
MockPipe(PricePipe),
MockPipe(ProductRoutePipe),
],
imports: [RouterTestingModule, TranslateModule.forRoot()],
}).compileComponents();
}));
TestBed.configureTestingModule({
imports: [
FormsSharedModule,
PipesModule,
ReactiveFormsModule,
StoreModule.forRoot({
shopping: combineReducers(shoppingReducers),
}),
TranslateModule.forRoot(),
],
declarations: [
LineItemEditComponent,
LineItemEditDialogComponent,
LineItemEditDialogContainerComponent,
MockComponent(LoadingComponent),
MockComponent(ModalDialogComponent),
MockComponent(ProductIdComponent),
MockComponent(ProductImageComponent),
MockComponent(ProductInventoryComponent),
MockComponent(ProductVariationSelectComponent),
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
MockComponent(LoadingComponent),
MockComponent(RequestReminderFormComponent),
MockComponent(ServerHtmlDirective),
MockComponent(UpdatePasswordFormComponent),
UpdatePasswordComponent,
],
imports: [RouterTestingModule, TranslateModule.forRoot(), ngrxTesting({ reducers: coreReducers })],
}).compileComponents();
}));
beforeEach(async(() => {
@Component({ template: 'dummy' })
class DummyComponent {}
TestBed.configureTestingModule({
declarations: [
CheckoutAddressComponent,
DummyComponent,
MockComponent(BasketCostSummaryComponent),
MockComponent(BasketInvoiceAddressWidgetComponent),
MockComponent(BasketItemsSummaryComponent),
MockComponent(BasketShippingAddressWidgetComponent),
MockComponent(BasketValidationResultsComponent),
MockComponent(ContentIncludeComponent),
MockComponent(ErrorMessageComponent),
MockComponent(ModalDialogLinkComponent),
],
imports: [
NgbCollapseModule,
ReactiveFormsModule,
RouterTestingModule.withRoutes([{ path: 'checkout/shipping', component: DummyComponent }]),
TranslateModule.forRoot(),
],
}).compileComponents();
}));
beforeEach(async(() => {
checkoutFacadeMock = mock(CheckoutFacade);
when(checkoutFacadeMock.basketValidationResults$).thenReturn(of(undefined));
TestBed.configureTestingModule({
declarations: [
BasketValidationResultsComponent,
MockComponent(BasketValidationItemsComponent),
MockComponent(BasketValidationProductsComponent),
],
imports: [
TranslateModule.forRoot(),
ngrxTesting({
reducers: {
checkout: combineReducers(checkoutReducers),
},
}),
],
providers: [{ provide: CheckoutFacade, useFactory: () => instance(checkoutFacadeMock) }],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MockComponent(LoadingComponent), MockComponent(QuoteEditComponent), QuoteEditPageComponent],
imports: [
RouterTestingModule.withRoutes([{ path: 'basket', component: QuoteEditPageComponent }]),
TranslateModule.forRoot(),
ngrxTesting({
reducers: {
quoting: combineReducers(quotingReducers),
shopping: combineReducers(shoppingReducers),
},
}),
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
MockComponent(LoadingComponent),
MockComponent(RequestReminderFormComponent),
MockComponent(ServerHtmlDirective),
MockComponent(UpdatePasswordFormComponent),
RequestReminderComponent,
],
imports: [RouterTestingModule, TranslateModule.forRoot(), ngrxTesting({ reducers: coreReducers })],
}).compileComponents();
}));
beforeEach(async(() => {
@Component({ template: 'dummy' })
class DummyComponent {}
TestBed.configureTestingModule({
declarations: [
CheckoutAddressComponent,
DummyComponent,
MockComponent(BasketCostSummaryComponent),
MockComponent(BasketInvoiceAddressWidgetComponent),
MockComponent(BasketItemsSummaryComponent),
MockComponent(BasketShippingAddressWidgetComponent),
MockComponent(BasketValidationResultsComponent),
MockComponent(ContentIncludeComponent),
MockComponent(ErrorMessageComponent),
MockComponent(ModalDialogLinkComponent),
],
imports: [
NgbCollapseModule,
ReactiveFormsModule,
RouterTestingModule.withRoutes([{ path: 'checkout/shipping', component: DummyComponent }]),
TranslateModule.forRoot(),
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
MockComponent(FormControlFeedbackComponent),
MockComponent(ShowFormFeedbackDirective),
SelectRegionComponent,
],
imports: [ReactiveFormsModule, TranslateModule.forRoot()],
})
.compileComponents()
.then(() => {
fixture = TestBed.createComponent(SelectRegionComponent);
component = fixture.componentInstance;
element = fixture.nativeElement;
const form = new FormGroup({
countryCode: new FormControl('BG'),
state: new FormControl('Region1', [Validators.required]),
});
component.form = form;
component.regions = [