← back to Sample Followup Sweep
test/compose-empty.test.js
9 lines
// TK-12320 (Cody FIX FIRST #2): compose() must refuse an empty follow-up letter.
const assert = require('assert');
const { compose } = require('../lib/compose.js');
const v = { name: 'X', account_number: '1', sample_email: 'a@b.com', ship_to: 'Y' };
assert.throws(() => compose(v, []), /empty follow-up/);
assert.throws(() => compose(v, undefined), /empty follow-up/);
assert.ok(compose(v, [{ mfr: 'ABC-1' }]).html.includes('ABC-1'));
console.log('compose-empty: ALL PASS');