MCPcopy Index your code
hub / github.com/nodejs/node / test_non_symlinks

Function test_non_symlinks

test/parallel/test-fs-realpath.js:370–383  ·  view source on GitHub ↗
(realpath, realpathSync, callback)

Source from the content-addressed store, hash-verified

368}
369
370function test_non_symlinks(realpath, realpathSync, callback) {
371 console.log('test_non_symlinks');
372 const entrydir = path.dirname(tmpAbsDir);
373 const entry = `${tmpAbsDir.slice(entrydir.length + 1)}/cycles/root.js`;
374 const expected = `${tmpAbsDir}/cycles/root.js`;
375 const origcwd = process.cwd();
376 process.chdir(entrydir);
377 assertEqualPath(realpathSync(entry), path.resolve(expected));
378 asynctest(realpath, [entry], callback, function(err, result) {
379 process.chdir(origcwd);
380 assertEqualPath(result, path.resolve(expected));
381 return true;
382 });
383}
384
385const upone = path.join(process.cwd(), '..');
386function test_escape_cwd(realpath, realpathSync, cb) {

Callers

nothing calls this directly

Calls 6

asynctestFunction · 0.85
chdirMethod · 0.80
sliceMethod · 0.65
realpathSyncFunction · 0.50
logMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…