mirror of https://github.com/lukechilds/node.git
Browse Source
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>v2.3.1-release
Roman Reiss
10 years ago
985 changed files with 2278 additions and 1125 deletions
@ -1 +1,4 @@ |
|||
lib/punycode.js |
|||
test/fixtures |
|||
test/**/node_modules |
|||
test/parallel/test-fs-non-number-arguments-throw.js |
|||
|
@ -0,0 +1,5 @@ |
|||
## Test-specific linter rules |
|||
|
|||
rules: |
|||
## allow unreachable code |
|||
no-unreachable: 0 |
@ -1,15 +1,16 @@ |
|||
'use strict'; |
|||
var assert = require('assert'); |
|||
var binding = require('./build/Release/binding'); |
|||
var called = false; |
|||
|
|||
process.on('exit', function () { |
|||
process.on('exit', function() { |
|||
assert(called); |
|||
}); |
|||
|
|||
binding(5, function (err, val) { |
|||
binding(5, function(err, val) { |
|||
assert.equal(null, err); |
|||
assert.equal(10, val); |
|||
process.nextTick(function () { |
|||
process.nextTick(function() { |
|||
called = true; |
|||
}); |
|||
}); |
|||
|
@ -1 +1,2 @@ |
|||
'use strict'; |
|||
var binding = require('./build/Release/binding'); |
|||
|
@ -1 +1 @@ |
|||
setInterval(function () {}, 500); |
|||
setInterval(function() {}, 500); |
|||
|
@ -1,5 +1,5 @@ |
|||
before |
|||
*test*message*throw_custom_error.js:7 |
|||
*test*message*throw_custom_error.js:8 |
|||
throw ({ name: 'MyCustomError', message: 'This is a custom message' }); |
|||
^ |
|||
MyCustomError: This is a custom message |
|||
|
@ -1,5 +1,5 @@ |
|||
before |
|||
*test*message*throw_in_line_with_tabs.js:8 |
|||
*test*message*throw_in_line_with_tabs.js:10 |
|||
throw ({ foo: 'bar' }); |
|||
^ |
|||
[object Object] |
|||
|
@ -1,5 +1,5 @@ |
|||
before |
|||
*test*message*throw_non_error.js:7 |
|||
*test*message*throw_non_error.js:8 |
|||
throw ({ foo: 'bar' }); |
|||
^ |
|||
[object Object] |
|||
|
@ -1,5 +1,5 @@ |
|||
|
|||
*test*message*throw_null.js:4 |
|||
*test*message*throw_null.js:5 |
|||
throw null; |
|||
^ |
|||
^ |
|||
null |
|||
|
@ -1,5 +1,5 @@ |
|||
|
|||
*test*message*throw_undefined.js:4 |
|||
*test*message*throw_undefined.js:5 |
|||
throw undefined; |
|||
^ |
|||
undefined |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue