Permalink
Browse files

test: remove third param from assert.strictEqual

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 fhinkel committed Mar 22, 2018
1 parent 8fb4ea9 commit 0c2cc89f3aab58a118f5e584cbeb4b20a6366cb0
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/parallel/test-fs-mkdir-rmdir.js
@@ -32,8 +32,8 @@ fs.mkdir(d, 0o666, common.mustCall(function(err) {
assert.strictEqual(this, undefined);
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 0c2cc89

Please sign in to comment.