mirror of https://github.com/lukechilds/node.git
Browse Source
The test directory had linting for undefined variables disabled. It is enabled everywhere else in the code base. Let's disable the fule for individual lines in the handful of tests that use undefined variables. PR-URL: https://github.com/nodejs/node/pull/6255 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>v4.x
committed by
Myles Borins
13 changed files with 19 additions and 26 deletions
@ -1,22 +1,14 @@ |
|||||
'use strict'; |
'use strict'; |
||||
require('../common'); |
const common = require('../common'); |
||||
var assert = require('assert'); |
|
||||
|
|
||||
process.on('uncaughtException', function(err) { |
process.on('uncaughtException', function(err) { |
||||
console.log('Caught exception: ' + err); |
console.log('Caught exception: ' + err); |
||||
}); |
}); |
||||
|
|
||||
var timeoutFired = false; |
setTimeout(common.mustCall(function() { |
||||
setTimeout(function() { |
|
||||
console.log('This will still run.'); |
console.log('This will still run.'); |
||||
timeoutFired = true; |
}), 50); |
||||
}, 500); |
|
||||
|
|
||||
process.on('exit', function() { |
|
||||
assert.ok(timeoutFired); |
|
||||
}); |
|
||||
|
|
||||
// Intentionally cause an exception, but don't catch it.
|
// Intentionally cause an exception, but don't catch it.
|
||||
nonexistentFunc(); |
nonexistentFunc(); // eslint-disable-line no-undef
|
||||
console.log('This will not run.'); |
common.fail('This will not run.'); |
||||
|
|
||||
|
Loading…
Reference in new issue