Skip to content

Commit

Permalink
test: remove third param from assert.strictEqual
Browse files Browse the repository at this point in the history
Removing third argument in calls to assert.strictEqual() so that the
values of the first two arguments are shown instead as this is more
useful for debugging.

Refs: https://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message

PR-URL: #19536
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
[email protected] authored and BethGriggs committed Dec 4, 2018

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent c3ecf05 commit ea1fda6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-fs-mkdir-rmdir.js
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@ fs.mkdir(d, 0o666, common.mustCall(function(err) {
fs.mkdir(d, 0o666, common.mustCall(function(err) {
assert.ok(err, 'got no error');
assert.ok(/^EEXIST/.test(err.message), 'got no EEXIST message');
assert.strictEqual(err.code, 'EEXIST', 'got no EEXIST code');
assert.strictEqual(err.path, d, 'got no proper path for EEXIST');
assert.strictEqual(err.code, 'EEXIST');
assert.strictEqual(err.path, d);

fs.rmdir(d, assert.ifError);
}));

0 comments on commit ea1fda6

Please sign in to comment.