UNPKG

declastruct-stripe-sdk

Version:

declarative control of stripe constructs, via declastruct

33 lines 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const test_fns_1 = require("test-fns"); describe('reqInvoiceCharge', () => { (0, test_fns_1.given)('a drafted invoice', () => { (0, test_fns_1.when)('we request to charge', () => { test_fns_1.then.todo('it should throw a bad request error', { because: 'the invoice has not been issued yet' }, () => { }); }); }); (0, test_fns_1.given)('an issued invoice', () => { (0, test_fns_1.when)('we request to charge a customer with a payment method', () => { test_fns_1.then.todo('it should succeed'); }); (0, test_fns_1.when)('we request to charge a customer without a payment method', () => { test_fns_1.then.todo('it should throw the error'); }); }); (0, test_fns_1.given)('a paid invoice', () => { (0, test_fns_1.when)('we request to charge', () => { test_fns_1.then.todo('it should throw a bad request error', { because: 'the invoice is already in a terminal state', }, () => { }); }); }); (0, test_fns_1.given)('a voided invoice', () => { (0, test_fns_1.when)('we request to charge', () => { test_fns_1.then.todo('it should throw a bad request error', { because: 'the invoice is already in a terminal state', }, () => { }); }); }); }); //# sourceMappingURL=reqInvoiceCharge.integration.test.js.map