Skip to content

Commit

Permalink
test: replace equal with strictEqual
Browse files Browse the repository at this point in the history
PR-URL: #32727
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
JesuHrz authored and MylesBorins committed Apr 17, 2020
1 parent 320f297 commit e18a40e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/parallel/test-assert-if-error.js
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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);
Expand Down

0 comments on commit e18a40e

Please sign in to comment.