test: replace equal with strictEqual

PR-URL: https://github.com/nodejs/node/pull/32727
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Jesus Hernandez 2020-04-08 16:01:35 -05:00 committed by Anna Henningsen
parent cbe955c227
commit 9c25ab1d30
No known key found for this signature in database
GPG Key ID: A94130F0BFC8EBE9

View File

@ -1,8 +1,7 @@
'use strict';
require('../common');
const assert = require('assert').strict;
/* eslint-disable no-restricted-properties */
const assert = require('assert');
// Test that assert.ifError has the correct stack trace of both stacks.
@ -26,12 +25,13 @@ const stack = err.stack;
try {
assert.ifError(err);
} catch (e) {
assert.equal(e.message, 'ifError got unwanted exception: test error');
assert.equal(err.message, msg);
assert.equal(e.actual, err);
assert.equal(e.actual.stack, stack);
assert.equal(e.expected, null);
assert.equal(e.operator, 'ifError');
assert.strictEqual(e.message,
'ifError got unwanted exception: test error');
assert.strictEqual(err.message, msg);
assert.strictEqual(e.actual, err);
assert.strictEqual(e.actual.stack, stack);
assert.strictEqual(e.expected, null);
assert.strictEqual(e.operator, 'ifError');
threw = true;
}
assert(threw);