You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given strict option is set to true and skipLines is set to 2
When skipped rows are parsed and skipped rows are validated for strict option
Then Uncaught TypeError: Cannot read property 'length' of null is return
Actual Behavior
Given strict option is set to true and skipLines is set to 2
When skipped rows are parsed
Then skipped rows should not be validated for strict option
How Do We Reproduce?
Pass in header option, {strict: true, skipLines: 2},
and use file contents:
Uncaught TypeError: Cannot read property 'length' of null at CsvParser._online (/home/rimash/Work/Excube/excubed/node_modules/csv-parser/index.js:202:54) at CsvParser._transform (/home/rimash/Work/Excube/excubed/node_modules/csv-parser/index.js:263:16) at CsvParser.Transform._read (_stream_transform.js:186:10) at CsvParser.Transform._write (_stream_transform.js:174:12) at doWrite (_stream_writable.js:397:12) at writeOrBuffer (_stream_writable.js:383:5) at CsvParser.Writable.write (_stream_writable.js:290:11) at ReadStream.ondata (_stream_readable.js:639:20) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ReadStream.Readable.push (_stream_readable.js:208:10) at fs.read (fs.js:2051:12) at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)
Expected Behavior
Given strict option is set to true and skipLines is set to 2
When skipped rows are parsed and skipped rows are validated for strict option
Then Uncaught TypeError: Cannot read property 'length' of null is return
Actual Behavior
Given strict option is set to true and skipLines is set to 2
When skipped rows are parsed
Then skipped rows should not be validated for strict option
How Do We Reproduce?
Pass in header option, {strict: true, skipLines: 2},
and use file contents:
Valuea0,Valueb0,Valuec0
Valuea1,Valueb1,Valuec1
Headera2,Headerb2,Headerc2
Valuea3,Valueb3,Valuec3
Valuea4,Valueb4,Valuec4
then result would be
Uncaught TypeError: Cannot read property 'length' of null at CsvParser._online (/home/rimash/Work/Excube/excubed/node_modules/csv-parser/index.js:202:54) at CsvParser._transform (/home/rimash/Work/Excube/excubed/node_modules/csv-parser/index.js:263:16) at CsvParser.Transform._read (_stream_transform.js:186:10) at CsvParser.Transform._write (_stream_transform.js:174:12) at doWrite (_stream_writable.js:397:12) at writeOrBuffer (_stream_writable.js:383:5) at CsvParser.Writable.write (_stream_writable.js:290:11) at ReadStream.ondata (_stream_readable.js:639:20) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at ReadStream.Readable.push (_stream_readable.js:208:10) at fs.read (fs.js:2051:12) at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)
but it should be
[{ 'Headera2': 'Valuea3', 'Headerb2': 'Valueb3', 'Headerc2': 'Valuec3' },
{ 'Headera2': 'Valuea4', 'Headerb2': 'Valueb4', 'Headerc2': 'Valuec4' }]
The text was updated successfully, but these errors were encountered: