From 8b0f373df0574b7cb3c6b531b4092cd670dac6e3 Mon Sep 17 00:00:00 2001 From: Daniel Lopretto Date: Wed, 9 Dec 2020 06:04:58 -0500 Subject: [PATCH] Use different socket for Win32 test (#3375) * Remove the skipping of the `socket` http test * Use different socket path for Win32 - See: https://github.com/nodejs/node-v0.x-archive/blob/master/test/simple/test-pipe-stream.js#L73 - Also: https://github.com/nodejs/node-v0.x-archive/blob/master/test/common.js#L39 * Updating axios in types to be lower case (#2797) Co-authored-by: Xianming Zhong Co-authored-by: Pilot Co-authored-by: Remco Haszing Co-authored-by: Xianming Zhong Co-authored-by: Jay --- test/unit/adapters/http.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/unit/adapters/http.js b/test/unit/adapters/http.js index 7fdeddf8d1..497eb28f73 100644 --- a/test/unit/adapters/http.js +++ b/test/unit/adapters/http.js @@ -370,13 +370,20 @@ describe('supports http with nodejs', function () { }); it('should support sockets', function (done) { + // Different sockets for win32 vs darwin/linux + var socketName = './test.sock'; + + if (process.platform === 'win32') { + socketName = '\\\\.\\pipe\\libuv-test'; + } + server = net.createServer(function (socket) { socket.on('data', function () { socket.end('HTTP/1.1 200 OK\r\n\r\n'); }); - }).listen('./test.sock', function () { + }).listen(socketName, function () { axios({ - socketPath: './test.sock', + socketPath: socketName, url: '/' }) .then(function (resp) {