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 b06c33b

Browse filesBrowse files
Trottdanielleadams
authored andcommitted
test: prepare tests for no-cond-assign ESLint rule
PR-URL: #41614 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent dacffd3 commit b06c33b
Copy full SHA for b06c33b
Expand file treeCollapse file tree

7 files changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-child-process-flush-stdio.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-flush-stdio.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const spawnWithReadable = () => {
2727
}));
2828
p.stdout.on('readable', () => {
2929
let buf;
30-
while (buf = p.stdout.read())
30+
while ((buf = p.stdout.read()) !== null)
3131
buffer.push(buf);
3232
});
3333
};
Collapse file

‎test/parallel/test-net-server-max-connections.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-server-max-connections.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function makeConnection(index) {
6868
if (closes === N / 2) {
6969
let cb;
7070
console.error('calling wait callback.');
71-
while (cb = waits.shift()) {
71+
while ((cb = waits.shift()) !== undefined) {
7272
cb();
7373
}
7474
server.close();
Collapse file

‎test/parallel/test-stream-readable-object-multi-push-async.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-readable-object-multi-push-async.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const BATCH = 10;
4747
readable.on('readable', () => {
4848
let data;
4949
console.log('readable emitted');
50-
while (data = readable.read()) {
50+
while ((data = readable.read()) !== null) {
5151
console.log(data);
5252
}
5353
});
Collapse file

‎test/parallel/test-stream-unshift-empty-chunk.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-unshift-empty-chunk.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let readAll = false;
4141
const seen = [];
4242
r.on('readable', () => {
4343
let chunk;
44-
while (chunk = r.read()) {
44+
while ((chunk = r.read()) !== null) {
4545
seen.push(chunk.toString());
4646
// Simulate only reading a certain amount of the data,
4747
// and then putting the rest of the chunk back into the
Collapse file

‎test/parallel/test-zlib-brotli-flush.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-brotli-flush.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ deflater.write(chunk, function() {
1616
deflater.flush(function() {
1717
const bufs = [];
1818
let buf;
19-
while (buf = deflater.read())
19+
while ((buf = deflater.read()) !== null)
2020
bufs.push(buf);
2121
actualFull = Buffer.concat(bufs);
2222
});
Collapse file

‎test/parallel/test-zlib-flush.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-flush.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ deflater.write(chunk, function() {
2323
deflater.flush(function() {
2424
const bufs = [];
2525
let buf;
26-
while (buf = deflater.read())
26+
while ((buf = deflater.read()) !== null)
2727
bufs.push(buf);
2828
actualFull = Buffer.concat(bufs);
2929
});
Collapse file

‎test/parallel/test-zlib-params.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-params.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ deflater.write(chunk1, function() {
2121
deflater.end(chunk2, function() {
2222
const bufs = [];
2323
let buf;
24-
while (buf = deflater.read())
24+
while ((buf = deflater.read()) !== null)
2525
bufs.push(buf);
2626
actual = Buffer.concat(bufs);
2727
});

0 commit comments

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