Skip to content

Commit 292aa42

Browse files
devsnektargos
authored andcommitted
test: fix faulty relpath test
PR-URL: #20954 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b510cdc commit 292aa42

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

test/parallel/test-fs-realpath-native.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ const common = require('../common');
33
const assert = require('assert');
44
const fs = require('fs');
55

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

8-
assert.strictEqual(fs.realpathSync.native('/users'), '/Users');
9-
fs.realpath.native('/users', common.mustCall(function(err, res) {
10-
assert.ifError(err);
11-
assert.strictEqual(res, '/Users');
12-
assert.strictEqual(this, undefined);
13-
}));
8+
assert.strictEqual(
9+
fs.realpathSync.native('./test/parallel/test-fs-realpath-native.js')
10+
.toLowerCase(),
11+
filename);
12+
13+
fs.realpath.native(
14+
'./test/parallel/test-fs-realpath-native.js',
15+
common.mustCall(function(err, res) {
16+
assert.ifError(err);
17+
assert.strictEqual(res.toLowerCase(), filename);
18+
assert.strictEqual(this, undefined);
19+
}));

0 commit comments

Comments
 (0)