Skip to content

Commit

Permalink
test: improve path tests
Browse files Browse the repository at this point in the history
Replaced deepStrictEqual with strictEqual when asserting that the
path is equal to the win32 or posix equivalent, since it is a more
strict check than deepStrictCheck. Also removed third argument
in the check so that if there is an assertion error the properties
that are different will be displayed.

PR-URL: #20967
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Shivang44 authored and MylesBorins committed Jun 6, 2018
1 parent f2c9e5a commit e4224fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ assert.strictEqual(path.win32.delimiter, ';');
assert.strictEqual(path.posix.delimiter, ':');

if (common.isWindows)
assert.deepStrictEqual(path, path.win32, 'should be win32 path module');
assert.strictEqual(path, path.win32);
else
assert.deepStrictEqual(path, path.posix, 'should be posix path module');
assert.strictEqual(path, path.posix);

0 comments on commit e4224fd

Please sign in to comment.