2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

test: fix Win32 platform support; (#10791)

This commit is contained in:
Dmitriy Mozgovoy
2026-04-22 09:50:37 +03:00
committed by GitHub
parent de1a810044
commit fba7fcc44e
+5 -1
View File
@@ -4469,7 +4469,11 @@ describe('supports http with nodejs', () => {
describe('socketPath security (GHSA-j96w-fp6f-pq6v)', () => {
function makeSocketPath() {
return path.join(os.tmpdir(), `axios-socketpath-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}.sock`);
const pipe = `axios-socketpath-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
return os.platform() === 'win32' ?
`\\\\.\\pipe\\${pipe}` :
path.join(os.tmpdir(), `${pipe}.sock`);
}
function startUnixServer(socketPath) {