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]>
  • Loading branch information
[email protected] authored and targos committed Mar 27, 2018
1 parent 5e9f929 commit 8996d3c
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
Expand Up @@ -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);
}));
Expand Down

0 comments on commit 8996d3c

Please sign in to comment.