import { TestBed } from '@angular/core/testing' ; import { ShippingOption } from '@daffodil/checkout' ; import { DaffShippingOptionFactory } from './shipping-option.factory' ; describe ( 'Checkout | Testing | Shipping | Factories | ShippingOptionFactory' , ( ) => { let shippingOptionFactory ; beforeEach ( ( ) => { TestBed . configureTestingModule ( { providers : [ DaffShippingOptionFactory ] , } ) ; shippingOptionFactory = TestBed . inject ( DaffShippingOptionFactory ) ; } ) ; it ( 'should be created' , ( ) => { expect ( shippingOptionFactory ) . toBeTruthy ( ) ; } ) ; describe ( 'create' , ( ) => { let result ; beforeEach ( ( ) => { result = shippingOptionFactory . create ( ) ; } ) ; xit ( 'should return a shipping option' , ( ) => { } ) ; } ) ; describe ( 'createMany' , ( ) => { let result ; it ( 'should create as many shipping rates as desired' , ( ) => { result = shippingOptionFactory . createMany ( 2 ) ; expect ( result . length ) . toEqual ( 2 ) ; result = shippingOptionFactory . createMany ( 3 ) ; expect ( result . length ) . toEqual ( 3 ) ; } ) ; } ) ; } ) ;