MockCart
import { MockCart } from '@daffodil/cart/testing'
class MockCart implements DaffCart {
id: faker.datatype.uuid()
coupons: []
items: []
billing_address: null
shipping_address: null
shipping_information: this.shippingInformationFactory.create()
totals: this.totalFactory.createAllTotals()
payment: null
available_shipping_methods: []
available_payment_methods: []
extra_attributes: {}
protected totalFactory: DaffCartTotalFactory
protected shippingInformationFactory: DaffCartShippingRateFactory
}
Properties
Name | Type | Description |
---|---|---|
id | faker.datatype.uuid() | |
coupons | [] | |
items | [] | |
billing_address | null | |
shipping_address | null | |
shipping_information | this.shippingInformationFactory.create() | |
totals | this.totalFactory.createAllTotals() | |
payment | null | |
available_shipping_methods | [] | |
available_payment_methods | [] | |
extra_attributes | {} | |
totalFactory | DaffCartTotalFactory | |
shippingInformationFactory | DaffCartShippingRateFactory |