mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
c3eb3efa31
The callback should run in the global scope and not in the FSReqWrap context. PR-URL: https://github.com/nodejs/node/pull/18668 Refs: https://github.com/nodejs/node/pull/12562 Refs: https://github.com/nodejs/node/pull/12976 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
14 lines
399 B
JavaScript
14 lines
399 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
|
|
if (!common.isOSX) common.skip('MacOS-only test.');
|
|
|
|
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);
|
|
}));
|