Skip to content

Commit

Permalink
test: fix faulty relpath test
Browse files Browse the repository at this point in the history
PR-URL: nodejs#20954
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
devsnek committed Jul 18, 2018
1 parent 42be4c3 commit 9cd932f
Showing 1 changed file with 13 additions and 7 deletions.
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);
}));

0 comments on commit 9cd932f

Please sign in to comment.