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(() => {
checkoutFacade = mock(CheckoutFacade);
TestBed.configureTestingModule({
declarations: [
MiniBasketContainerComponent,
MockComponent(FaIconComponent),
MockComponent(ProductImageComponent),
MockPipe(ProductRoutePipe),
PricePipe,
],
imports: [RouterTestingModule, TranslateModule.forRoot()],
providers: [
{
provide: CheckoutFacade,
useFactory: () => instance(checkoutFacade),
},
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [CategoryNavigationComponent, MockPipe(CategoryRoutePipe)],
})
.compileComponents()
.then(() => {
fixture = TestBed.createComponent(CategoryNavigationComponent);
component = fixture.componentInstance;
element = fixture.nativeElement;
const tree = categoryTree([
{ uniqueId: 'A', categoryPath: ['A'] },
{ uniqueId: 'A.1', categoryPath: ['A', 'A.1'] },
] as Category[]);
component.category = createCategoryView(tree, 'A');
});
}));
class DummyComponent {}
TestBed.configureTestingModule({
declarations: [
CheckoutShippingComponent,
DummyComponent,
MockComponent(BasketAddressSummaryComponent),
MockComponent(BasketCostSummaryComponent),
MockComponent(BasketItemsSummaryComponent),
MockComponent(BasketValidationResultsComponent),
MockComponent(ContentIncludeComponent),
MockComponent(ErrorMessageComponent),
MockComponent(FaIconComponent),
MockComponent(ModalDialogLinkComponent),
MockComponent(NgbPopover),
MockPipe(PricePipe),
],
imports: [
ReactiveFormsModule,
RouterTestingModule.withRoutes([{ path: 'checkout/payment', component: DummyComponent }]),
TranslateModule.forRoot(),
],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
LineItemListComponent,
MockComponent(BasketPromotionContainerComponent),
MockComponent(FaIconComponent),
MockComponent(InputComponent),
MockComponent(LineItemDescriptionComponent),
MockComponent(ProductImageComponent),
MockComponent(PromotionDetailsComponent),
MockPipe(PricePipe),
MockPipe(ProductRoutePipe),
],
imports: [ReactiveFormsModule, RouterTestingModule, TranslateModule.forRoot()],
}).compileComponents();
}));
configureTestSuite(() => {
TestBed.configureTestingModule({
imports: [
ReactiveFormsModule,
RouterTestingModule,
NoopAnimationsModule,
MatAutocompleteModule,
MatFormFieldModule,
MatInputModule
],
declarations: [
MockPipe(CapitalizeFirstPipe),
SearchBarComponent
],
providers: [
{provide: HeroService, useValue: heroServiceSpy},
{provide: ROUTES_CONFIG, useValue: RoutesConfig}
]
});
});
TestBed.configureTestingModule({
declarations: [
CheckoutPaymentComponent,
DummyComponent,
MockComponent(BasketAddressSummaryComponent),
MockComponent(BasketCostSummaryComponent),
MockComponent(BasketItemsSummaryComponent),
MockComponent(BasketPromotionCodeComponent),
MockComponent(BasketValidationResultsComponent),
MockComponent(ContentIncludeComponent),
MockComponent(ErrorMessageComponent),
MockComponent(FormlyForm),
MockComponent(ModalDialogLinkComponent),
MockComponent(NgbCollapse),
MockComponent(PaymentConcardisCreditcardComponent),
MockPipe(PricePipe),
],
imports: [
ReactiveFormsModule,
RouterTestingModule.withRoutes([{ path: 'checkout/review', component: DummyComponent }]),
TranslateModule.forRoot(),
],
})
.overrideComponent(CheckoutPaymentComponent, {
set: { changeDetection: ChangeDetectionStrategy.Default },
})
.compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AccountOrderComponent,
MockComponent(AddressComponent),
MockComponent(BasketCostSummaryComponent),
MockComponent(FaIconComponent),
MockComponent(InfoBoxComponent),
MockComponent(LineItemListComponent),
MockPipe(DatePipe),
],
imports: [TranslateModule.forRoot()],
}).compileComponents();
}));
beforeEach(async(() => {
accountFacade = mock(AccountFacade);
TestBed.configureTestingModule({
declarations: [
MockComponent(AddressComponent),
MockComponent(LoadingComponent),
MockPipe(DatePipe),
MockPipe(PricePipe),
OrderListContainerComponent,
],
providers: [{ provide: AccountFacade, useFactory: () => instance(accountFacade) }],
imports: [RouterTestingModule, TranslateModule.forRoot()],
}).compileComponents();
}));
beforeEach(async(() => {
accountFacade = mock(AccountFacade);
TestBed.configureTestingModule({
declarations: [
MockComponent(AddressComponent),
MockComponent(LoadingComponent),
MockPipe(DatePipe),
MockPipe(PricePipe),
OrderListContainerComponent,
],
providers: [{ provide: AccountFacade, useFactory: () => instance(accountFacade) }],
imports: [RouterTestingModule, TranslateModule.forRoot()],
}).compileComponents();
}));
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [TestComponentWrapper, UserSmallCardComponent, MockPipe(TelephonePipe, (...args) => args[0])],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));