diff options
author | Roman Reiss <me@silverwind.io> | 2015-05-19 13:00:06 +0200 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2015-05-19 21:21:27 +0200 |
commit | f29762f4dd5811464684f820286f1c90a694bdff (patch) | |
tree | 67ba73a81c3938f41796dfa4c595f9713de59933 /test/parallel/test-fs-read-stream-inherit.js | |
parent | 85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff) | |
download | node-new-f29762f4dd5811464684f820286f1c90a694bdff.tar.gz |
test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.
test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.
PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-fs-read-stream-inherit.js')
-rw-r--r-- | test/parallel/test-fs-read-stream-inherit.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/parallel/test-fs-read-stream-inherit.js b/test/parallel/test-fs-read-stream-inherit.js index c8da148e04..3b53578397 100644 --- a/test/parallel/test-fs-read-stream-inherit.js +++ b/test/parallel/test-fs-read-stream-inherit.js @@ -1,3 +1,4 @@ +'use strict'; var common = require('../common'); var assert = require('assert'); @@ -80,7 +81,8 @@ process.on('exit', function() { console.error('ok'); }); -var file4 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1, start: 1, end: 2})); +var file4 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1, + start: 1, end: 2})); assert.equal(file4.start, 1); assert.equal(file4.end, 2); var contentRead = ''; @@ -91,7 +93,8 @@ file4.on('end', function(data) { assert.equal(contentRead, 'yz'); }); -var file5 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1, start: 1})); +var file5 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1, + start: 1})); assert.equal(file5.start, 1); file5.data = ''; file5.on('data', function(data) { @@ -102,7 +105,8 @@ file5.on('end', function() { }); // https://github.com/joyent/node/issues/2320 -var file6 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1.23, start: 1})); +var file6 = fs.createReadStream(rangeFile, Object.create({bufferSize: 1.23, + start: 1})); assert.equal(file6.start, 1); file6.data = ''; file6.on('data', function(data) { @@ -116,7 +120,8 @@ assert.throws(function() { fs.createReadStream(rangeFile, Object.create({start: 10, end: 2})); }, /start must be <= end/); -var stream = fs.createReadStream(rangeFile, Object.create({ start: 0, end: 0 })); +var stream = fs.createReadStream(rangeFile, Object.create({ start: 0, + end: 0 })); assert.equal(stream.start, 0); assert.equal(stream.end, 0); stream.data = ''; @@ -145,7 +150,7 @@ file7.on('end', function() { }); }); -function file7Next(){ +function file7Next() { // This will tell us if the fd is usable again or not. file7 = fs.createReadStream(null, Object.create({fd: file7.fd, start: 0 })); file7.data = ''; @@ -158,7 +163,8 @@ function file7Next(){ } // Just to make sure autoClose won't close the stream because of error. -var file8 = fs.createReadStream(null, Object.create({fd: 13337, autoClose: false })); +var file8 = fs.createReadStream(null, Object.create({fd: 13337, + autoClose: false })); file8.on('data', function() {}); file8.on('error', common.mustCall(function() {})); |