Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a97a6a9

Browse filesBrowse files
silverwindMyles Borins
authored andcommitted
test: fix issues for ESLint 2.7.0
PR-URL: #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>
1 parent 1aa6c5b commit a97a6a9
Copy full SHA for a97a6a9

File tree

Expand file treeCollapse file tree

5 files changed

+24
-28
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+24
-28
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-async-wrap-disabled-propagate-parent.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const async_wrap = process.binding('async_wrap');
77
const providers = Object.keys(async_wrap.Providers);
88

99
let cntr = 0;
10-
let server;
1110
let client;
1211

1312
function init(type, id, parent) {
@@ -27,7 +26,7 @@ function noop() { }
2726
async_wrap.setupHooks(init, noop, noop);
2827
async_wrap.enable();
2928

30-
server = net.createServer(function(c) {
29+
const server = net.createServer(function(c) {
3130
client = c;
3231
// Allow init callback to run before closing.
3332
setImmediate(() => {
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-async-wrap-propagate-parent.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const net = require('net');
66
const async_wrap = process.binding('async_wrap');
77

88
let cntr = 0;
9-
let server;
109
let client;
1110

1211
function init(type, id, parent) {
@@ -25,7 +24,7 @@ function noop() { }
2524
async_wrap.setupHooks(init, noop, noop);
2625
async_wrap.enable();
2726

28-
server = net.createServer(function(c) {
27+
const server = net.createServer(function(c) {
2928
client = c;
3029
// Allow init callback to run before closing.
3130
setImmediate(() => {
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-stream-writev.js
+18-19Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,24 @@ function test(decode, uncork, multi, next) {
4343
assert(false, 'Should not call _write');
4444
};
4545

46-
var expectChunks = decode ?
47-
[
48-
{ encoding: 'buffer',
49-
chunk: [104, 101, 108, 108, 111, 44, 32] },
50-
{ encoding: 'buffer',
51-
chunk: [119, 111, 114, 108, 100] },
52-
{ encoding: 'buffer',
53-
chunk: [33] },
54-
{ encoding: 'buffer',
55-
chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] },
56-
{ encoding: 'buffer',
57-
chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173]}
58-
] : [
59-
{ encoding: 'ascii', chunk: 'hello, ' },
60-
{ encoding: 'utf8', chunk: 'world' },
61-
{ encoding: 'buffer', chunk: [33] },
62-
{ encoding: 'binary', chunk: '\nand then...' },
63-
{ encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' }
64-
];
46+
var expectChunks = decode ? [
47+
{ encoding: 'buffer',
48+
chunk: [104, 101, 108, 108, 111, 44, 32] },
49+
{ encoding: 'buffer',
50+
chunk: [119, 111, 114, 108, 100] },
51+
{ encoding: 'buffer',
52+
chunk: [33] },
53+
{ encoding: 'buffer',
54+
chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] },
55+
{ encoding: 'buffer',
56+
chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173]}
57+
] : [
58+
{ encoding: 'ascii', chunk: 'hello, ' },
59+
{ encoding: 'utf8', chunk: 'world' },
60+
{ encoding: 'buffer', chunk: [33] },
61+
{ encoding: 'binary', chunk: '\nand then...' },
62+
{ encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' }
63+
];
6564

6665
var actualChunks;
6766
w._writev = function(chunks, cb) {
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-timers-immediate.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var assert = require('assert');
55
let immediateA = false;
66
let immediateB = false;
77
let immediateC = [];
8-
let before;
98

109
setImmediate(function() {
1110
try {
@@ -16,7 +15,7 @@ setImmediate(function() {
1615
clearImmediate(immediateB);
1716
});
1817

19-
before = process.hrtime();
18+
const before = process.hrtime();
2019

2120
immediateB = setImmediate(function() {
2221
immediateB = true;
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-timers-unref.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let timeout_fired = false;
77
let unref_interval = false;
88
let unref_timer = false;
99
let unref_callbacks = 0;
10-
let interval, check_unref, checks = 0;
10+
let checks = 0;
1111

1212
var LONG_TIME = 10 * 1000;
1313
var SHORT_TIME = 100;
@@ -28,7 +28,7 @@ setTimeout(function() {
2828
timeout_fired = true;
2929
}, LONG_TIME).unref();
3030

31-
interval = setInterval(function() {
31+
const interval = setInterval(function() {
3232
unref_interval = true;
3333
clearInterval(interval);
3434
}, SHORT_TIME);
@@ -38,7 +38,7 @@ setTimeout(function() {
3838
unref_timer = true;
3939
}, SHORT_TIME).unref();
4040

41-
check_unref = setInterval(function() {
41+
const check_unref = setInterval(function() {
4242
if (checks > 5 || (unref_interval && unref_timer))
4343
clearInterval(check_unref);
4444
checks += 1;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.