Skip to content

Commit

Permalink
test: fix faulty relpath test
Browse files Browse the repository at this point in the history
PR-URL: #20954
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
devsnek authored and targos committed Jul 19, 2018
1 parent b510cdc commit 292aa42
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 292aa42

Please sign in to comment.