UNPKG

docparse-dumpinvoices

Version:

takes a list of couchdb invoice ids and exports the data contained within those invoices to an Excel spreadsheet

31 lines (28 loc) 894 B
var assert = require('assert') var isLatePaymentCreditCost = require('../lib/isLatePaymentCreditCost') describe('Is Late Payment Credit', function () { it('should return true for late payment credit', function () { var cost = { description: 'late pmt chg credit', value: '1.99' } var isMatch = isLatePaymentCreditCost(cost) assert.ok(isMatch, 'should match') }) it('should return false for late payment credit credit', function () { var cost = { description: 'late pmt chg', value: '1.99' } var isMatch = isLatePaymentCreditCost(cost) assert.ok(!isMatch, 'should not be late payment credit') }) it('should return false for other cost', function () { var cost = { description: 'adjustment', value: '1.99' } var isMatch = isLatePaymentCreditCost(cost) assert.ok(!isMatch, 'should not match') }) })