From 8f2f3bf75d68a1c211dcc38114cd12a13d713335 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 14 Jun 2016 23:20:09 +0100 Subject: [PATCH] Fix CSV test --- test/nodes/core/parsers/70-CSV_spec.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/nodes/core/parsers/70-CSV_spec.js b/test/nodes/core/parsers/70-CSV_spec.js index 3db624271..0fbaab09e 100644 --- a/test/nodes/core/parsers/70-CSV_spec.js +++ b/test/nodes/core/parsers/70-CSV_spec.js @@ -54,7 +54,7 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - msg.should.have.property('payload', { a: 1, b: 2, c: 3, d: 4 }); + msg.should.have.property('payload', { a: '1', b: '2', c: '3', d: '4' }); done(); }); var testString = "1,2,3,4"+String.fromCharCode(10); @@ -69,7 +69,7 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - msg.should.have.property('payload', { a: 1, b: 2, c: 3, d: 4 }); + msg.should.have.property('payload', { a: '1', b: '2', c: '3', d: '4' }); done(); }); var testString = "1,2,3,4"+String.fromCharCode(10); @@ -84,7 +84,7 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - msg.should.have.property('payload', { col1: 1, col2: 2, col3: 3, col4: 4 }); + msg.should.have.property('payload', { col1: '1', col2: '2', col3: '3', col4: '4' }); done(); }); var testString = "1,2,3,4"+String.fromCharCode(10); @@ -99,7 +99,7 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - msg.should.have.property('payload', { a: 1, d: 4 }); + msg.should.have.property('payload', { a: '1', d: '4' }); done(); }); var testString = "1,2,3,4"+String.fromCharCode(10); @@ -115,7 +115,8 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - msg.should.have.property('payload', { a: 1, b: -2, c: '+3', d: 4, e: -5, f: 'ab"cd', g: 'with,a,comma' }); + //console.log(msg); + msg.should.have.property('payload', { a: '1', b: '-2', c: '+3', d: 4, e: -5, f: 'ab"cd', g: 'with,a,comma' }); done(); }); var testString = '"1","-2","+3","04","-05",ab""cd,"with,a,comma"'+String.fromCharCode(10); @@ -133,11 +134,11 @@ describe('CSV node', function() { n2.on("input", function(msg) { //console.log(msg); if (c === 0) { - msg.should.have.property('payload', { w: 1, x: 2, y: 3, z: 4 }); + msg.should.have.property('payload', { w: '1', x: '2', y: '3', z: '4' }); c += 1; } - else { - msg.should.have.property('payload', { w: 5, x: 6, y: 7, z: 8 }); + else { + msg.should.have.property('payload', { w: '5', x: '6', y: '7', z: '8' }); done(); } }); @@ -153,8 +154,7 @@ describe('CSV node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - //console.log(msg); - msg.should.have.property('payload', [ { a: 1, b: 2, c: 3, d: 4 },{ a: 5, b: -6, c: 7, d: '+8' },{ a: 9, b: 0, c: 'a', d: 'b' },{ a: 'c', b: 'd', c: 'e', d: 'f' } ]); + msg.should.have.property('payload', [ { a: '1', b: '2', c: '3', d: '4' },{ a: '5', b: '-6', c: 7, d: '+8' },{ a: '9', b: '0', c: 'a', d: 'b' },{ a: 'c', b: 'd', c: 'e', d: 'f' } ]); done(); }); var testString = "1,2,3,4\n5,-6,07,+8\n9,0,a,b\nc,d,e,f";