UNPKG

docparse-supplier-nge

Version:

process ngrid electric utility bill data for use in the docparse system

31 lines (28 loc) 843 B
var should = require('should'); var assert = require('assert'); var path = require('path'); var fs = require('fs'); var inspect = require('eyespect').inspector(); var parseSupply = require('../lib/parse/parseSupply'); describe('parse supply', function() { it('parse supply wiring should be hooked up correctly', function(done) { var supplyData = {}; var getSupplyText = function (text) { return 'foo supply text'; }; var getSupplyData = function(text, cb) { cb(null, supplyData); }; var data = { getSupplyText: getSupplyText, getSupplyData: getSupplyData, text: 'foo text' }; parseSupply(data, function (err, reply) { should.not.exist(err, 'error geting other costs:' + err); should.exist(reply); supplyData.should.eql(reply); done(); }); }); });