diff options
author | utvk <utvk@users.noreply.github.com> | 2014-07-08 18:49:53 +0200 |
---|---|---|
committer | utvk <utvk@users.noreply.github.com> | 2014-07-08 18:49:53 +0200 |
commit | dff368f4a840ffb6dba66fa8c176472977f79a2e (patch) | |
tree | 98b397a864c896f226762d2c3a9a3f4d4516ce02 /test/etatsbasen_test.js | |
parent | c5823a6596c2cf64b4c12d88eb84e2bca8a8dabe (diff) |
Added -o option
Diffstat (limited to 'test/etatsbasen_test.js')
-rw-r--r-- | test/etatsbasen_test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/etatsbasen_test.js b/test/etatsbasen_test.js index 1b7c7da..6f42db7 100644 --- a/test/etatsbasen_test.js +++ b/test/etatsbasen_test.js @@ -74,6 +74,21 @@ exports.etatsbasen = { test.ok(!err); test.done(); }, { filename: 'fixtures/2.csv', categories: [36,37] }); + }, + 'filter headers': function(test) { + var oldLogger = console.log; + console.log = function(str) { + test.expect(5); + test.ok(str.match(/.*request\_email.*/), 'Can\'t find filtered header email'); + test.equal(str.split('\n').length, 10); + test.ok(!str.match(/\,\,/), 'Found empty entries (WARNING: suspect test)'); + test.ok(str.match(/.*name\.nn.*/, 'Missing name.nn header')); + }; + etatsbasen.printCSV(function(err) { + console.log = oldLogger; + test.ok(!err); + test.done(); + }, { filename: 'fixtures/2.csv', headers: ['request_email', 3] }); } } }; |