summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-12-30 10:09:13 -0500
committercjihrig <cjihrig@gmail.com>2017-01-06 14:08:47 -0500
commite5499b32cfcde144ee41500356d45d990cd9df0e (patch)
tree5241a5db3f80fee2d6a8e2b255f49157d5733d56
parent75ebd19d8dff5c65f94f7cf0a847b63d952ca864 (diff)
downloadandroid-node-v8-e5499b32cfcde144ee41500356d45d990cd9df0e.tar.gz
android-node-v8-e5499b32cfcde144ee41500356d45d990cd9df0e.tar.bz2
android-node-v8-e5499b32cfcde144ee41500356d45d990cd9df0e.zip
test: s/assert.notEqual()/assert.notStrictEqual()/
PR-URL: https://github.com/nodejs/node/pull/10541 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
-rw-r--r--test/addons/load-long-path/test.js2
-rw-r--r--test/disabled/test-setuidgid.js4
-rw-r--r--test/doctool/test-doctool-html.js2
-rw-r--r--test/fixtures/not-main-module.js6
-rw-r--r--test/parallel/test-child-process-spawn-shell.js2
-rw-r--r--test/parallel/test-child-process-spawnsync-shell.js2
-rw-r--r--test/parallel/test-console.js2
-rw-r--r--test/parallel/test-crypto-fips.js4
-rw-r--r--test/parallel/test-crypto-hash.js6
-rw-r--r--test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js12
-rw-r--r--test/parallel/test-event-emitter-remove-all-listeners.js4
-rw-r--r--test/parallel/test-fs-access.js4
-rw-r--r--test/parallel/test-https-agent-disable-session-reuse.js4
-rw-r--r--test/parallel/test-https-agent-session-reuse.js16
-rw-r--r--test/parallel/test-module-loading-error.js4
-rw-r--r--test/parallel/test-net-keepalive.js2
-rw-r--r--test/parallel/test-net-listen-exclusive-random-ports.js2
-rw-r--r--test/parallel/test-net-remote-address-port.js26
-rw-r--r--test/parallel/test-process-cpuUsage.js2
-rw-r--r--test/parallel/test-regress-GH-7511.js2
-rw-r--r--test/parallel/test-regress-GH-node-9326.js2
-rw-r--r--test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js2
-rw-r--r--test/parallel/test-socket-write-after-fin-error.js2
-rw-r--r--test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js2
-rw-r--r--test/parallel/test-tls-handshake-error.js2
-rw-r--r--test/parallel/test-tls-set-ciphers.js2
-rw-r--r--test/parallel/test-whatwg-url-searchparams-constructor.js10
-rw-r--r--test/parallel/test-whatwg-url-searchparams-get.js2
-rw-r--r--test/parallel/test-zlib-sync-no-event.js2
29 files changed, 67 insertions, 67 deletions
diff --git a/test/addons/load-long-path/test.js b/test/addons/load-long-path/test.js
index 6e540fea55..ea0783331b 100644
--- a/test/addons/load-long-path/test.js
+++ b/test/addons/load-long-path/test.js
@@ -33,5 +33,5 @@ fs.writeFileSync(addonDestinationPath, contents);
// Attempt to load at long path destination
const addon = require(addonDestinationPath);
-assert.notEqual(addon, null);
+assert.notStrictEqual(addon, null);
assert.strictEqual(addon.hello(), 'world');
diff --git a/test/disabled/test-setuidgid.js b/test/disabled/test-setuidgid.js
index 6b3b578f37..3603e9bb42 100644
--- a/test/disabled/test-setuidgid.js
+++ b/test/disabled/test-setuidgid.js
@@ -6,12 +6,12 @@ const assert = require('assert');
var oldgid = process.getgid();
process.setgid('nobody');
var newgid = process.getgid();
-assert.notEqual(newgid, oldgid, 'gids expected to be different');
+assert.notStrictEqual(newgid, oldgid, 'gids expected to be different');
var olduid = process.getuid();
process.setuid('nobody');
var newuid = process.getuid();
-assert.notEqual(newuid, olduid, 'uids expected to be different');
+assert.notStrictEqual(newuid, olduid, 'uids expected to be different');
try {
process.setuid('nobody1234');
diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js
index bd21e21d95..0179aaf24e 100644
--- a/test/doctool/test-doctool-html.js
+++ b/test/doctool/test-doctool-html.js
@@ -96,7 +96,7 @@ testData.forEach(function(item) {
const actual = output.replace(/\s/g, '');
// Assert that the input stripped of all whitespace contains the
// expected list
- assert.notEqual(actual.indexOf(expected), -1);
+ assert.notStrictEqual(actual.indexOf(expected), -1);
}));
}));
}));
diff --git a/test/fixtures/not-main-module.js b/test/fixtures/not-main-module.js
index de024cd92e..4897a294ea 100644
--- a/test/fixtures/not-main-module.js
+++ b/test/fixtures/not-main-module.js
@@ -1,4 +1,4 @@
const assert = require('assert');
-assert.notEqual(module, require.main, 'require.main should not == module');
-assert.notEqual(module, process.mainModule,
- 'process.mainModule should not === module');
+assert.notStrictEqual(module, require.main, 'require.main should not == module');
+assert.notStrictEqual(module, process.mainModule,
+ 'process.mainModule should not === module');
diff --git a/test/parallel/test-child-process-spawn-shell.js b/test/parallel/test-child-process-spawn-shell.js
index 591fb409cb..01411144bd 100644
--- a/test/parallel/test-child-process-spawn-shell.js
+++ b/test/parallel/test-child-process-spawn-shell.js
@@ -6,7 +6,7 @@ const cp = require('child_process');
// Verify that a shell is, in fact, executed
const doesNotExist = cp.spawn('does-not-exist', {shell: true});
-assert.notEqual(doesNotExist.spawnfile, 'does-not-exist');
+assert.notStrictEqual(doesNotExist.spawnfile, 'does-not-exist');
doesNotExist.on('error', common.fail);
doesNotExist.on('exit', common.mustCall((code, signal) => {
assert.strictEqual(signal, null);
diff --git a/test/parallel/test-child-process-spawnsync-shell.js b/test/parallel/test-child-process-spawnsync-shell.js
index 620a01c453..7048308924 100644
--- a/test/parallel/test-child-process-spawnsync-shell.js
+++ b/test/parallel/test-child-process-spawnsync-shell.js
@@ -6,7 +6,7 @@ const cp = require('child_process');
// Verify that a shell is, in fact, executed
const doesNotExist = cp.spawnSync('does-not-exist', {shell: true});
-assert.notEqual(doesNotExist.file, 'does-not-exist');
+assert.notStrictEqual(doesNotExist.file, 'does-not-exist');
assert.strictEqual(doesNotExist.error, undefined);
assert.strictEqual(doesNotExist.signal, null);
diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js
index ee7170bd91..0eb7924cb6 100644
--- a/test/parallel/test-console.js
+++ b/test/parallel/test-console.js
@@ -115,7 +115,7 @@ assert.strictEqual("{ foo: 'bar', inspect: [Function: inspect] }\n",
strings.shift());
assert.strictEqual("{ foo: 'bar', inspect: [Function: inspect] }\n",
strings.shift());
-assert.notEqual(-1, strings.shift().indexOf('foo: [Object]'));
+assert.ok(strings.shift().includes('foo: [Object]'));
assert.strictEqual(-1, strings.shift().indexOf('baz'));
assert.ok(/^label: \d+\.\d{3}ms$/.test(strings.shift().trim()));
assert.ok(/^__proto__: \d+\.\d{3}ms$/.test(strings.shift().trim()));
diff --git a/test/parallel/test-crypto-fips.js b/test/parallel/test-crypto-fips.js
index 51ff8ef759..f27c596247 100644
--- a/test/parallel/test-crypto-fips.js
+++ b/test/parallel/test-crypto-fips.js
@@ -47,10 +47,10 @@ function testHelper(stream, args, expectedOutput, cmd, env) {
function responseHandler(buffer, expectedOutput) {
const response = buffer.toString();
- assert.notEqual(0, response.length);
+ assert.notStrictEqual(response.length, 0);
if (FIPS_ENABLED !== expectedOutput && FIPS_DISABLED !== expectedOutput) {
// In the case of expected errors just look for a substring.
- assert.notEqual(-1, response.indexOf(expectedOutput));
+ assert.ok(response.includes(expectedOutput));
} else {
// Normal path where we expect either FIPS enabled or disabled.
assert.strictEqual(expectedOutput, Number(response));
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
index effbec11e1..ba1143cefb 100644
--- a/test/parallel/test-crypto-hash.js
+++ b/test/parallel/test-crypto-hash.js
@@ -67,8 +67,8 @@ assert.deepStrictEqual(
// stream interface should produce the same result.
assert.deepStrictEqual(a5, a3, 'stream interface is consistent');
assert.deepStrictEqual(a6, a3, 'stream interface is consistent');
-assert.notEqual(a7, undefined, 'no data should return data');
-assert.notEqual(a8, undefined, 'empty string should generate data');
+assert.notStrictEqual(a7, undefined, 'no data should return data');
+assert.notStrictEqual(a8, undefined, 'empty string should generate data');
// Test multiple updates to same hash
var h1 = crypto.createHash('sha1').update('Test123').digest('hex');
@@ -100,7 +100,7 @@ assert.strictEqual(
'4b21bbd1a68e690a730ddcb5a8bc94ead9879ffe82580767ad7ec6fa8ba2dea6' +
'43a821af66afa9a45b6a78c712fecf0e56dc7f43aef4bcfc8eb5b4d8dca6ea5b');
-assert.notEqual(
+assert.notStrictEqual(
hutf8,
crypto.createHash('sha512').update('УТФ-8 text', 'latin1').digest('hex'));
diff --git a/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js b/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js
index fc6a93ccdc..cf7ca1d014 100644
--- a/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js
+++ b/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js
@@ -61,9 +61,9 @@ function runTestWithoutAbortOnUncaughtException() {
assert(!stderr.includes(domainErrMsg), 'stderr output must not ' +
'include domain\'s error\'s message');
- assert.notEqual(err.code, 0,
- 'child process should have exited with a non-zero ' +
- 'exit code, but did not');
+ assert.notStrictEqual(err.code, 0,
+ 'child process should have exited with a ' +
+ 'non-zero exit code, but did not');
});
}
@@ -71,9 +71,9 @@ function runTestWithAbortOnUncaughtException() {
child_process.exec(createTestCmdLine({
withAbortOnUncaughtException: true
}), function onTestDone(err, stdout, stderr) {
- assert.notEqual(err.code, RAN_UNCAUGHT_EXCEPTION_HANDLER_EXIT_CODE,
- 'child process should not have run its uncaughtException ' +
- 'event handler');
+ assert.notStrictEqual(err.code, RAN_UNCAUGHT_EXCEPTION_HANDLER_EXIT_CODE,
+ 'child process should not have run its ' +
+ 'uncaughtException event handler');
assert(common.nodeProcessAborted(err.code, err.signal),
'process should have aborted, but did not');
});
diff --git a/test/parallel/test-event-emitter-remove-all-listeners.js b/test/parallel/test-event-emitter-remove-all-listeners.js
index e32a0e3f94..076c1ea1d7 100644
--- a/test/parallel/test-event-emitter-remove-all-listeners.js
+++ b/test/parallel/test-event-emitter-remove-all-listeners.js
@@ -39,8 +39,8 @@ function listener() {}
assert.deepStrictEqual(bazListeners, [listener, listener]);
// After calling removeAllListeners(),
// new listeners arrays is different from the old.
- assert.notEqual(ee.listeners('bar'), barListeners);
- assert.notEqual(ee.listeners('baz'), bazListeners);
+ assert.notStrictEqual(ee.listeners('bar'), barListeners);
+ assert.notStrictEqual(ee.listeners('baz'), bazListeners);
}
{
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index e3346556cf..a74ad9dcce 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -72,7 +72,7 @@ fs.access(__filename, fs.R_OK, common.mustCall((err) => {
}));
fs.access(doesNotExist, common.mustCall((err) => {
- assert.notEqual(err, null, 'error should exist');
+ assert.notStrictEqual(err, null, 'error should exist');
assert.strictEqual(err.code, 'ENOENT');
assert.strictEqual(err.path, doesNotExist);
}));
@@ -85,7 +85,7 @@ fs.access(readOnlyFile, fs.W_OK, common.mustCall((err) => {
if (hasWriteAccessForReadonlyFile) {
assert.ifError(err);
} else {
- assert.notEqual(err, null, 'error should exist');
+ assert.notStrictEqual(err, null, 'error should exist');
assert.strictEqual(err.path, readOnlyFile);
}
}));
diff --git a/test/parallel/test-https-agent-disable-session-reuse.js b/test/parallel/test-https-agent-disable-session-reuse.js
index dc9878d4a1..2f59118e36 100644
--- a/test/parallel/test-https-agent-disable-session-reuse.js
+++ b/test/parallel/test-https-agent-disable-session-reuse.js
@@ -54,6 +54,6 @@ const server = https.createServer(options, function(req, res) {
process.on('exit', function() {
assert.equal(serverRequests, TOTAL_REQS);
assert.equal(clientSessions.length, TOTAL_REQS);
- assert.notEqual(clientSessions[0].toString('hex'),
- clientSessions[1].toString('hex'));
+ assert.notStrictEqual(clientSessions[0].toString('hex'),
+ clientSessions[1].toString('hex'));
});
diff --git a/test/parallel/test-https-agent-session-reuse.js b/test/parallel/test-https-agent-session-reuse.js
index 73465aa5a9..3f06d1699f 100644
--- a/test/parallel/test-https-agent-session-reuse.js
+++ b/test/parallel/test-https-agent-session-reuse.js
@@ -117,14 +117,14 @@ process.on('exit', function() {
assert.strictEqual(serverRequests, 6);
assert.strictEqual(clientSessions['first'].toString('hex'),
clientSessions['first-reuse'].toString('hex'));
- assert.notEqual(clientSessions['first'].toString('hex'),
- clientSessions['cipher-change'].toString('hex'));
- assert.notEqual(clientSessions['first'].toString('hex'),
- clientSessions['before-drop'].toString('hex'));
- assert.notEqual(clientSessions['cipher-change'].toString('hex'),
- clientSessions['before-drop'].toString('hex'));
- assert.notEqual(clientSessions['before-drop'].toString('hex'),
- clientSessions['after-drop'].toString('hex'));
+ assert.notStrictEqual(clientSessions['first'].toString('hex'),
+ clientSessions['cipher-change'].toString('hex'));
+ assert.notStrictEqual(clientSessions['first'].toString('hex'),
+ clientSessions['before-drop'].toString('hex'));
+ assert.notStrictEqual(clientSessions['cipher-change'].toString('hex'),
+ clientSessions['before-drop'].toString('hex'));
+ assert.notStrictEqual(clientSessions['before-drop'].toString('hex'),
+ clientSessions['after-drop'].toString('hex'));
assert.strictEqual(clientSessions['after-drop'].toString('hex'),
clientSessions['after-drop-reuse'].toString('hex'));
});
diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js
index 1958fe6524..b8454f2ae9 100644
--- a/test/parallel/test-module-loading-error.js
+++ b/test/parallel/test-module-loading-error.js
@@ -28,11 +28,11 @@ try {
try {
require();
} catch (e) {
- assert.notEqual(e.toString().indexOf('missing path'), -1);
+ assert.ok(e.toString().includes('missing path'));
}
try {
require({});
} catch (e) {
- assert.notEqual(e.toString().indexOf('path must be a string'), -1);
+ assert.ok(e.toString().includes('path must be a string'));
}
diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js
index e466f0ff58..8b6998fa83 100644
--- a/test/parallel/test-net-keepalive.js
+++ b/test/parallel/test-net-keepalive.js
@@ -16,7 +16,7 @@ var echoServer = net.createServer(function(connection) {
echoServer.close();
}, 1), common.platformTimeout(100));
connection.setTimeout(0);
- assert.notEqual(connection.setKeepAlive, undefined);
+ assert.notStrictEqual(connection.setKeepAlive, undefined);
// send a keepalive packet after 50 ms
connection.setKeepAlive(true, common.platformTimeout(50));
connection.on('end', function() {
diff --git a/test/parallel/test-net-listen-exclusive-random-ports.js b/test/parallel/test-net-listen-exclusive-random-ports.js
index 4c5d056d9d..974af6aaa6 100644
--- a/test/parallel/test-net-listen-exclusive-random-ports.js
+++ b/test/parallel/test-net-listen-exclusive-random-ports.js
@@ -15,7 +15,7 @@ if (cluster.isMaster) {
worker2.on('message', function(port2) {
assert.equal(port2, port2 | 0, 'second worker could not listen');
- assert.notEqual(port1, port2, 'ports should not be equal');
+ assert.notStrictEqual(port1, port2, 'ports should not be equal');
worker1.kill();
worker2.kill();
});
diff --git a/test/parallel/test-net-remote-address-port.js b/test/parallel/test-net-remote-address-port.js
index 62a7ebfe57..9cdf4ff7f8 100644
--- a/test/parallel/test-net-remote-address-port.js
+++ b/test/parallel/test-net-remote-address-port.js
@@ -13,16 +13,16 @@ var remoteFamilyCandidates = ['IPv4'];
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');
var server = net.createServer(common.mustCall(function(socket) {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(socket.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(socket.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
assert.ok(socket.remotePort);
- assert.notEqual(socket.remotePort, this.address().port);
+ assert.notStrictEqual(socket.remotePort, this.address().port);
socket.on('end', function() {
if (++conns_closed === 2) server.close();
});
socket.on('close', function() {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(socket.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(socket.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
});
socket.resume();
}, 2));
@@ -31,23 +31,23 @@ server.listen(0, 'localhost', function() {
var client = net.createConnection(this.address().port, 'localhost');
var client2 = net.createConnection(this.address().port);
client.on('connect', function() {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(client.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(client.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(client.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(client.remoteFamily));
assert.strictEqual(client.remotePort, server.address().port);
client.end();
});
client.on('close', function() {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(client.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(client.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(client.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(client.remoteFamily));
});
client2.on('connect', function() {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(client2.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(client2.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(client2.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(client2.remoteFamily));
assert.strictEqual(client2.remotePort, server.address().port);
client2.end();
});
client2.on('close', function() {
- assert.notEqual(-1, remoteAddrCandidates.indexOf(client2.remoteAddress));
- assert.notEqual(-1, remoteFamilyCandidates.indexOf(client2.remoteFamily));
+ assert.ok(remoteAddrCandidates.includes(client2.remoteAddress));
+ assert.ok(remoteFamilyCandidates.includes(client2.remoteFamily));
});
});
diff --git a/test/parallel/test-process-cpuUsage.js b/test/parallel/test-process-cpuUsage.js
index 92dc719185..0e8443f09a 100644
--- a/test/parallel/test-process-cpuUsage.js
+++ b/test/parallel/test-process-cpuUsage.js
@@ -57,7 +57,7 @@ assert.throws(function() {
// Ensure that the return value is the expected shape.
function validateResult(result) {
- assert.notEqual(result, null);
+ assert.notStrictEqual(result, null);
assert(Number.isFinite(result.user));
assert(Number.isFinite(result.system));
diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-regress-GH-7511.js
index d18a3ae02c..97e2fdb811 100644
--- a/test/parallel/test-regress-GH-7511.js
+++ b/test/parallel/test-regress-GH-7511.js
@@ -6,5 +6,5 @@ const vm = require('vm');
assert.doesNotThrow(function() {
var context = vm.createContext({ process: process });
var result = vm.runInContext('process.env["PATH"]', context);
- assert.notEqual(undefined, result);
+ assert.notStrictEqual(undefined, result);
});
diff --git a/test/parallel/test-regress-GH-node-9326.js b/test/parallel/test-regress-GH-node-9326.js
index 920a24e3a1..3dbbe2958b 100644
--- a/test/parallel/test-regress-GH-node-9326.js
+++ b/test/parallel/test-regress-GH-node-9326.js
@@ -10,5 +10,5 @@ var cp = child_process.spawn(process.execPath, [
]);
cp.on('exit', function(code) {
- assert.notEqual(code, 0);
+ assert.notStrictEqual(code, 0);
});
diff --git a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js
index 0a80a86038..aa749591eb 100644
--- a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js
+++ b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js
@@ -6,5 +6,5 @@ const assert = require('assert');
const content = require(common.fixturesDir +
'/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js');
-assert.notEqual(content.rocko, 'artischocko');
+assert.notStrictEqual(content.rocko, 'artischocko');
assert.equal(content, 'hello from module-stub!');
diff --git a/test/parallel/test-socket-write-after-fin-error.js b/test/parallel/test-socket-write-after-fin-error.js
index 8ceb0c6558..0d280115a4 100644
--- a/test/parallel/test-socket-write-after-fin-error.js
+++ b/test/parallel/test-socket-write-after-fin-error.js
@@ -49,7 +49,7 @@ server.listen(0, function() {
assert(gotServerEnd);
assert(gotServerError);
assert.equal(gotServerError.code, 'EPIPE');
- assert.notEqual(gotServerError.message, 'write after end');
+ assert.notStrictEqual(gotServerError.message, 'write after end');
console.log('ok');
});
diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js
index 971c485a4c..03c6cf7fd3 100644
--- a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js
+++ b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js
@@ -37,5 +37,5 @@ timers.enroll(foo, 1);
timers._unrefActive(foo);
setTimeout(function() {
- assert.notEqual(nbTimersFired, 2);
+ assert.notStrictEqual(nbTimersFired, 2);
}, 20);
diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js
index 4d6a64a150..7623f816f3 100644
--- a/test/parallel/test-tls-handshake-error.js
+++ b/test/parallel/test-tls-handshake-error.js
@@ -25,7 +25,7 @@ var server = tls.createServer({
});
c.on('error', common.mustCall(function(err) {
- assert.notEqual(err.code, 'ECONNRESET');
+ assert.notStrictEqual(err.code, 'ECONNRESET');
}));
c.on('close', common.mustCall(function(err) {
diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js
index e61f8448be..ef08c56460 100644
--- a/test/parallel/test-tls-set-ciphers.js
+++ b/test/parallel/test-tls-set-ciphers.js
@@ -26,7 +26,7 @@ const reply = 'I AM THE WALRUS'; // something recognizable
let response = '';
process.on('exit', function() {
- assert.notEqual(response.indexOf(reply), -1);
+ assert.ok(response.includes(reply));
});
const server = tls.createServer(options, common.mustCall(function(conn) {
diff --git a/test/parallel/test-whatwg-url-searchparams-constructor.js b/test/parallel/test-whatwg-url-searchparams-constructor.js
index 9834902158..34ccb4c37d 100644
--- a/test/parallel/test-whatwg-url-searchparams-constructor.js
+++ b/test/parallel/test-whatwg-url-searchparams-constructor.js
@@ -30,7 +30,7 @@ assert.throws(() => {
});
}, TypeError);
params = new URLSearchParams('');
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
// eslint-disable-next-line no-proto
assert.strictEqual(params.__proto__, URLSearchParams.prototype,
'expected URLSearchParams.prototype as prototype.');
@@ -40,19 +40,19 @@ assert.strictEqual(params + '', '%5Bobject%20Object%5D=');
// URLSearchParams constructor, string.
params = new URLSearchParams('a=b');
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
assert.strictEqual(true, params.has('a'),
'Search params object has name "a"');
assert.strictEqual(false, params.has('b'),
'Search params object has not got name "b"');
params = new URLSearchParams('a=b&c');
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
assert.strictEqual(true, params.has('a'),
'Search params object has name "a"');
assert.strictEqual(true, params.has('c'),
'Search params object has name "c"');
params = new URLSearchParams('&a&&& &&&&&a+b=& c&m%c3%b8%c3%b8');
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
assert.strictEqual(true, params.has('a'), 'Search params object has name "a"');
assert.strictEqual(true, params.has('a b'),
'Search params object has name "a b"');
@@ -68,7 +68,7 @@ assert.strictEqual(true, params.has('møø'),
// URLSearchParams constructor, object.
const seed = new URLSearchParams('a=b&c=d');
params = new URLSearchParams(seed);
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
assert.strictEqual(params.get('a'), 'b');
assert.strictEqual(params.get('c'), 'd');
assert.strictEqual(false, params.has('d'));
diff --git a/test/parallel/test-whatwg-url-searchparams-get.js b/test/parallel/test-whatwg-url-searchparams-get.js
index 667738f817..cfc6c345a6 100644
--- a/test/parallel/test-whatwg-url-searchparams-get.js
+++ b/test/parallel/test-whatwg-url-searchparams-get.js
@@ -24,7 +24,7 @@ assert.strictEqual(params.get('a'), '');
// More get() basics
params = new URLSearchParams('first=second&third&&');
-assert.notEqual(params, null, 'constructor returned non-null value.');
+assert.notStrictEqual(params, null, 'constructor returned non-null value.');
assert.strictEqual(true, params.has('first'),
'Search params object has name "first"');
assert.strictEqual(params.get('first'), 'second',
diff --git a/test/parallel/test-zlib-sync-no-event.js b/test/parallel/test-zlib-sync-no-event.js
index 46ea97fbf4..d6eb1f3c9d 100644
--- a/test/parallel/test-zlib-sync-no-event.js
+++ b/test/parallel/test-zlib-sync-no-event.js
@@ -17,5 +17,5 @@ const unzipper = new zlib.Gunzip();
unzipper.on('close', shouldNotBeCalled);
const unzipped = unzipper._processChunk(zipped, zlib.constants.Z_FINISH);
-assert.notEqual(zipped.toString(), message);
+assert.notStrictEqual(zipped.toString(), message);
assert.strictEqual(unzipped.toString(), message);