diff --git a/test/common/index.js b/test/common/index.js index 3ef8b667d3e648..78d36df7712d3d 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -258,7 +258,8 @@ 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; }