Skip to content

Commit 46cafad

Browse files
JesuHrzBridgeAR
authored andcommitted
test: replace equal with strictEqual
PR-URL: #32727 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent edc10d4 commit 46cafad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/parallel/test-assert-if-error.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use strict';
22

33
require('../common');
4-
const assert = require('assert').strict;
5-
/* eslint-disable no-restricted-properties */
4+
const assert = require('assert');
65

76
// Test that assert.ifError has the correct stack trace of both stacks.
87

@@ -26,12 +25,13 @@ const stack = err.stack;
2625
try {
2726
assert.ifError(err);
2827
} catch (e) {
29-
assert.equal(e.message, 'ifError got unwanted exception: test error');
30-
assert.equal(err.message, msg);
31-
assert.equal(e.actual, err);
32-
assert.equal(e.actual.stack, stack);
33-
assert.equal(e.expected, null);
34-
assert.equal(e.operator, 'ifError');
28+
assert.strictEqual(e.message,
29+
'ifError got unwanted exception: test error');
30+
assert.strictEqual(err.message, msg);
31+
assert.strictEqual(e.actual, err);
32+
assert.strictEqual(e.actual.stack, stack);
33+
assert.strictEqual(e.expected, null);
34+
assert.strictEqual(e.operator, 'ifError');
3535
threw = true;
3636
}
3737
assert(threw);

0 commit comments

Comments
 (0)