From 292aa42bd1c1056f1d35acaf0d728eca55eb7487 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 24 May 2018 19:32:50 -0500 Subject: [PATCH] test: fix faulty relpath test PR-URL: https://github.com/nodejs/node/pull/20954 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- test/parallel/test-fs-realpath-native.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-fs-realpath-native.js b/test/parallel/test-fs-realpath-native.js index 93b5a278cf4f1e..089572442d62f5 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); + }));