UNPKG

declastruct-stripe-sdk

Version:

declarative control of stripe constructs, via declastruct

20 lines 991 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const test_fns_1 = require("test-fns"); const uuid_fns_1 = require("uuid-fns"); const getStripeCredentials_1 = require("../../__test_assets__/getStripeCredentials"); const getStripe_1 = require("../auth/getStripe"); const getInvoice_1 = require("./getInvoice"); const log = console; describe('getInvoice', () => { (0, test_fns_1.given)('a ref to an invoice which does not exist yet', () => { const ref = { id: (0, uuid_fns_1.getUuid)() }; (0, test_fns_1.when)('we try to get it', () => { (0, test_fns_1.then)('we should get null', async () => { const result = await (0, getInvoice_1.getInvoice)({ by: { primary: ref } }, { stripe: await (0, getStripe_1.getStripe)((0, getStripeCredentials_1.getStripeCredentials)()), log }); expect(result).toEqual(null); }); }); }); }); //# sourceMappingURL=getInvoice.integration.test.js.map