Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: fix faulty relpath test
PR-URL: #20954
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
devsnek committed Jul 18, 2018
commit 9cd932f4359daf4d9add982cda70dfa5215f3f8a
20 changes: 13 additions & 7 deletions test/parallel/test-fs-realpath-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ const common = require('../common');
const assert = require('assert');
const fs = require('fs');

if (!common.isOSX) common.skip('MacOS-only test.');
const filename = __filename.toLowerCase();

assert.strictEqual(fs.realpathSync.native('/users'), '/Users');
fs.realpath.native('/users', common.mustCall(function(err, res) {
assert.ifError(err);
assert.strictEqual(res, '/Users');
assert.strictEqual(this, undefined);
}));
assert.strictEqual(
fs.realpathSync.native('./test/parallel/test-fs-realpath-native.js')
.toLowerCase(),
filename);

fs.realpath.native(
'./test/parallel/test-fs-realpath-native.js',
common.mustCall(function(err, res) {
assert.ifError(err);
assert.strictEqual(res.toLowerCase(), filename);
assert.strictEqual(this, undefined);
}));