diff --git a/test/common/index.js b/test/common/index.js index 278f9f6a781474..bd5413ce1f03e9 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -258,9 +258,12 @@ Object.defineProperty(exports, 'hasFipsCrypto', { }); { - const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : `${exports.tmpDir}/`; + const localRelative = path.relative(process.cwd(), `${exports.tmpDir}/`); + const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : localRelative; const pipeName = `node-test.${process.pid}.sock`; + exports.PIPE = pipePrefix + pipeName; + } {