GitHub

MockMagentoCartWithStoreCredit

import { MockMagentoCartWithStoreCredit } from '@daffodil/cart-store-credit/driver/magento/testing'

class MockMagentoCartWithStoreCredit extends MockMagentoCart implements MagentoCartWithStoreCredit {
  applied_store_credit: { applied_balance: MagentoMoney; enabled: any; } = {
      applied_balance: this.moneyFactory.create(),
      enabled: faker.datatype.boolean(),
    }
  protected moneyFactory: MagentoMoneyFactory
}