Browse Source

Add test case for headers with preceding comments

As described in #351
pull/370/head
Sergi Almacellas Abellana 8 years ago
parent
commit
229af70497
  1. 10
      tests/test-cases.js

10
tests/test-cases.js

@ -910,6 +910,16 @@ var PARSE_TESTS = [ @@ -910,6 +910,16 @@ var PARSE_TESTS = [
data: [['a', 'b', 'c,d']],
errors: []
}
},
{
description: "Header row with preceding comment",
notes: "Must parse correctly headers if they are preceded by comments",
input: '#Comment\na,b\nc,d\n',
config: { header: true, comments: '#', skipEmptyLines: true, delimiter: ','},
expected: {
data: [{'a': 'c', 'b': 'd'}],
errors: []
}
}
];

Loading…
Cancel
Save