Skip to content

Commit 49cd917

Browse files
committed
Add test for #113
1 parent 1313353 commit 49cd917

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testCSVConverter2.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,14 @@ describe("CSV Converter", function() {
254254
});
255255
rs.pipe(test_converter);
256256
});
257+
it ("should output ndjson format",function(done){
258+
var conv=new Converter();
259+
conv.fromString("a,b,c\n1,2,3\n4,5,6").on("data",function(d){
260+
d=d.toString();
261+
assert.equal(d[d.length-1],"\n")
262+
})
263+
.on("end",done)
264+
})
257265
// it ("should convert big csv",function(done){
258266
// // var rs=fs.createReadStream(__dirname+"/data/large-csv-sample.csv");
259267
// var rs=fs.createReadStream("/Users/kxiang/tmp/csvdata");

0 commit comments

Comments
 (0)