Skip to content

Commit 343ff66

Browse files
committed
test: fix multiple incorrect mustNotCall() uses
1 parent 339c40d commit 343ff66

7 files changed

+8
-8
lines changed

test/parallel/test-console-log-stdio-broken-dest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const stream = new Writable({
1515
});
1616
const myConsole = new Console(stream, stream);
1717

18-
process.on('warning', common.mustNotCall);
18+
process.on('warning', common.mustNotCall());
1919

2020
stream.cork();
2121
for (let i = 0; i < EventEmitter.defaultMaxListeners + 1; i++) {

test/parallel/test-dns-channel-cancel-promise.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const addMessageListener = () => {
1111
server.removeAllListeners('message');
1212

1313
server.once('message', () => {
14-
server.once('message', common.mustNotCall);
14+
server.once('message', common.mustNotCall());
1515

1616
resolver.cancel();
1717
});

test/parallel/test-dns-channel-cancel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const addMessageListener = () => {
1414
server.removeAllListeners('message');
1515

1616
server.once('message', () => {
17-
server.once('message', common.mustNotCall);
17+
server.once('message', common.mustNotCall());
1818

1919
resolver.cancel();
2020
});

test/parallel/test-http2-https-fallback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function onSession(session, next) {
141141

142142
function testNoTls() {
143143
// HTTP/1.1 client
144-
get(Object.assign(parse(origin), clientOptions), common.mustNotCall)
144+
get(Object.assign(parse(origin), clientOptions), common.mustNotCall())
145145
.on('error', common.mustCall(cleanup))
146146
.on('error', common.mustCall(testWrongALPN))
147147
.end();

test/parallel/test-stream-readable-reading-readingMore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const Readable = require('stream').Readable;
124124
assert.strictEqual(state.reading, false);
125125
assert.strictEqual(state.readingMore, false);
126126

127-
const onReadable = common.mustNotCall;
127+
const onReadable = common.mustNotCall();
128128

129129
readable.on('readable', onReadable);
130130

test/parallel/test-zlib-invalid-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ nonStringInputs.forEach(common.mustCall((input) => {
5353

5454
unzips.forEach(common.mustCall((uz, i) => {
5555
uz.on('error', common.mustCall());
56-
uz.on('end', common.mustNotCall);
56+
uz.on('end', common.mustNotCall());
5757

5858
// This will trigger error event
5959
uz.write('this is not valid compressed data.');

test/parallel/test-zlib-sync-no-event.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const message = 'Come on, Fhqwhgads.';
77
const buffer = Buffer.from(message);
88

99
const zipper = new zlib.Gzip();
10-
zipper.on('close', common.mustNotCall);
10+
zipper.on('close', common.mustNotCall());
1111

1212
const zipped = zipper._processChunk(buffer, zlib.constants.Z_FINISH);
1313

1414
const unzipper = new zlib.Gunzip();
15-
unzipper.on('close', common.mustNotCall);
15+
unzipper.on('close', common.mustNotCall());
1616

1717
const unzipped = unzipper._processChunk(zipped, zlib.constants.Z_FINISH);
1818
assert.notStrictEqual(zipped.toString(), message);

0 commit comments

Comments
 (0)