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 <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
davis.okoth@kemsa.co.ke 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
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.