summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-realpath-native.js
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2018-05-24 19:32:50 -0500
committerGus Caplan <me@gus.host>2018-07-18 10:47:22 -0500
commit9cd932f4359daf4d9add982cda70dfa5215f3f8a (patch)
tree1ad071c1f45f82d2626434f00905e327ab05a529 /test/parallel/test-fs-realpath-native.js
parent42be4c3befbb619b335816eecbe459faa4194531 (diff)
downloadandroid-node-v8-9cd932f4359daf4d9add982cda70dfa5215f3f8a.tar.gz
android-node-v8-9cd932f4359daf4d9add982cda70dfa5215f3f8a.tar.bz2
android-node-v8-9cd932f4359daf4d9add982cda70dfa5215f3f8a.zip
test: fix faulty relpath test
PR-URL: https://github.com/nodejs/node/pull/20954 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-fs-realpath-native.js')
-rw-r--r--test/parallel/test-fs-realpath-native.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/test/parallel/test-fs-realpath-native.js b/test/parallel/test-fs-realpath-native.js
index 93b5a278cf..089572442d 100644
--- a/test/parallel/test-fs-realpath-native.js
+++ b/test/parallel/test-fs-realpath-native.js
@@ -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);
+ }));