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 = {
"consistent-this": "off", "consistent-this": "off",
"curly": "off", "curly": "off",
"default-case": "error", "default-case": "error",
"dot-location": "off", "dot-location": "error",
"dot-notation": "error", "dot-notation": "error",
"eol-last": "error", "eol-last": "error",
"eqeqeq": "error", "eqeqeq": "error",

52
tests/node-tests.js

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

Loading…
Cancel
Save