mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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:
1 parent
edc10d4fa6
commit
46cafadeac
1 file changed
+8
-8
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user