Browse Source

Reverted dot-location eslint rule

pull/494/head
Trevor Harwell 7 years ago
parent
commit
33d56b2988
  1. 2
      .eslintrc.js
  2. 52
      tests/node-tests.js

2
.eslintrc.js

@ -42,7 +42,7 @@ module.exports = { @@ -42,7 +42,7 @@ module.exports = {
"consistent-this": "off",
"curly": "off",
"default-case": "error",
"dot-location": "off",
"dot-location": "error",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",

52
tests/node-tests.js

@ -61,32 +61,32 @@ describe('PapaParse', function() { @@ -61,32 +61,32 @@ describe('PapaParse', function() {
it('piped streaming CSV should be correctly parsed', function(done) {
var data = [];
fs.createReadStream(__dirname + '/long-sample.csv', 'utf8')
.pipe(Papa.parse(Papa.NODE_STREAM_INPUT))
.on('data', function(item) {
data.push(item);
})
.on('end', function() {
assert.deepEqual(data[0], [
'Grant',
'Dyer',
'Donec.elementum@orciluctuset.example',
'2013-11-23T02:30:31-08:00',
'2014-05-31T01:06:56-07:00',
'Magna Ut Associates',
'ljenkins'
]);
assert.deepEqual(data[7], [
'Talon',
'Salinas',
'posuere.vulputate.lacus@Donecsollicitudin.example',
'2015-01-31T09:19:02-08:00',
'2014-12-17T04:59:18-08:00',
'Aliquam Iaculis Incorporate',
'Phasellus@Quisquetincidunt.example'
]);
done();
});
var readStream = fs.createReadStream(__dirname + '/long-sample.csv', 'utf8');
var csvStream = readStream.pipe(Papa.parse(Papa.NODE_STREAM_INPUT));
csvStream.on('data', function(item) {
data.push(item);
});
csvStream.on('end', function() {
assert.deepEqual(data[0], [
'Grant',
'Dyer',
'Donec.elementum@orciluctuset.example',
'2013-11-23T02:30:31-08:00',
'2014-05-31T01:06:56-07:00',
'Magna Ut Associates',
'ljenkins'
]);
assert.deepEqual(data[7], [
'Talon',
'Salinas',
'posuere.vulputate.lacus@Donecsollicitudin.example',
'2015-01-31T09:19:02-08:00',
'2014-12-17T04:59:18-08:00',
'Aliquam Iaculis Incorporate',
'Phasellus@Quisquetincidunt.example'
]);
done();
});
});
it('should support pausing and resuming on same tick when streaming', function(done) {

Loading…
Cancel
Save