Browse Source

test: fix issues for ESLint 2.7.0

PR-URL: https://github.com/nodejs/node/pull/6132
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
process-exit-stdio-flushing
silverwind 9 years ago
parent
commit
ffe5c8385e
No known key found for this signature in database GPG Key ID: 2E62B41C93869443
  1. 3
      test/parallel/test-async-wrap-disabled-propagate-parent.js
  2. 3
      test/parallel/test-async-wrap-propagate-parent.js
  3. 3
      test/parallel/test-stream-writev.js
  4. 3
      test/parallel/test-timers-immediate.js
  5. 6
      test/parallel/test-timers-unref.js

3
test/parallel/test-async-wrap-disabled-propagate-parent.js

@ -9,7 +9,6 @@ const providers = Object.keys(async_wrap.Providers);
const uidSymbol = Symbol('uid');
let cntr = 0;
let server;
let client;
function init(uid, type, parentUid, parentHandle) {
@ -34,7 +33,7 @@ function noop() { }
async_wrap.setupHooks({ init });
async_wrap.enable();
server = net.createServer(function(c) {
const server = net.createServer(function(c) {
client = c;
// Allow init callback to run before closing.
setImmediate(() => {

3
test/parallel/test-async-wrap-propagate-parent.js

@ -9,7 +9,6 @@ const providers = Object.keys(async_wrap.Providers);
const uidSymbol = Symbol('uid');
let cntr = 0;
let server;
let client;
function init(uid, type, parentUid, parentHandle) {
@ -34,7 +33,7 @@ function noop() { }
async_wrap.setupHooks({ init });
async_wrap.enable();
server = net.createServer(function(c) {
const server = net.createServer(function(c) {
client = c;
// Allow init callback to run before closing.
setImmediate(() => {

3
test/parallel/test-stream-writev.js

@ -43,8 +43,7 @@ function test(decode, uncork, multi, next) {
assert(false, 'Should not call _write');
};
var expectChunks = decode ?
[
var expectChunks = decode ? [
{ encoding: 'buffer',
chunk: [104, 101, 108, 108, 111, 44, 32] },
{ encoding: 'buffer',

3
test/parallel/test-timers-immediate.js

@ -5,7 +5,6 @@ var assert = require('assert');
let immediateA = false;
let immediateB = false;
let immediateC = [];
let before;
setImmediate(function() {
try {
@ -16,7 +15,7 @@ setImmediate(function() {
clearImmediate(immediateB);
});
before = process.hrtime();
const before = process.hrtime();
immediateB = setImmediate(function() {
immediateB = true;

6
test/parallel/test-timers-unref.js

@ -7,7 +7,7 @@ let timeout_fired = false;
let unref_interval = false;
let unref_timer = false;
let unref_callbacks = 0;
let interval, check_unref, checks = 0;
let checks = 0;
var LONG_TIME = 10 * 1000;
var SHORT_TIME = 100;
@ -28,7 +28,7 @@ setTimeout(function() {
timeout_fired = true;
}, LONG_TIME).unref();
interval = setInterval(function() {
const interval = setInterval(function() {
unref_interval = true;
clearInterval(interval);
}, SHORT_TIME);
@ -38,7 +38,7 @@ setTimeout(function() {
unref_timer = true;
}, SHORT_TIME).unref();
check_unref = setInterval(function() {
const check_unref = setInterval(function() {
if (checks > 5 || (unref_interval && unref_timer))
clearInterval(check_unref);
checks += 1;

Loading…
Cancel
Save