Skip to content

Commit

Permalink
test: fix assert.strictEqual() parameter order in test-path-maklong.js
Browse files Browse the repository at this point in the history
The argument order in the strictEqual check was in the wrong order.
The first argument is now the actual value and the second argument is
the expected value.

PR-URL: #23587
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
blakehall authored and MylesBorins committed Oct 30, 2018
1 parent 8b38c2e commit c9ba20a
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions test/parallel/test-path-makelong.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ if (common.isWindows) {
const file = fixtures.path('a.js');
const resolvedFile = path.resolve(file);

assert.strictEqual(`\\\\?\\${resolvedFile}`,
path.toNamespacedPath(file));
assert.strictEqual(`\\\\?\\${resolvedFile}`,
path.toNamespacedPath(`\\\\?\\${file}`));
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile',
path.toNamespacedPath(
'\\\\someserver\\someshare\\somefile'));
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile', path
.toNamespacedPath('\\\\?\\UNC\\someserver\\someshare\\somefile'));
assert.strictEqual('\\\\.\\pipe\\somepipe',
path.toNamespacedPath('\\\\.\\pipe\\somepipe'));
assert.strictEqual(path.toNamespacedPath(file),
`\\\\?\\${resolvedFile}`);
assert.strictEqual(path.toNamespacedPath(`\\\\?\\${file}`),
`\\\\?\\${resolvedFile}`);
assert.strictEqual(path.toNamespacedPath(
'\\\\someserver\\someshare\\somefile'),
'\\\\?\\UNC\\someserver\\someshare\\somefile');
assert.strictEqual(path.toNamespacedPath(
'\\\\?\\UNC\\someserver\\someshare\\somefile'),
'\\\\?\\UNC\\someserver\\someshare\\somefile');
assert.strictEqual(path.toNamespacedPath('\\\\.\\pipe\\somepipe'),
'\\\\.\\pipe\\somepipe');
}

assert.strictEqual(path.toNamespacedPath(null), null);
Expand Down

0 comments on commit c9ba20a

Please sign in to comment.