From a738299fd609c68ddcdac2f794e9104e56671032 Mon Sep 17 00:00:00 2001 From: Pilot Date: Sun, 25 Oct 2020 13:27:31 -0400 Subject: [PATCH 1/3] Remove the skipping of the `socket` http test --- test/unit/adapters/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/adapters/http.js b/test/unit/adapters/http.js index 52fa155392..9c3fcd7fbf 100644 --- a/test/unit/adapters/http.js +++ b/test/unit/adapters/http.js @@ -368,7 +368,7 @@ describe('supports http with nodejs', function () { }); }); - it.skip('should support sockets', function (done) { + it('should support sockets', function (done) { server = net.createServer(function (socket) { socket.on('data', function () { socket.end('HTTP/1.1 200 OK\r\n\r\n'); From f2e96036aadf113d922c050db16831742f8a7e59 Mon Sep 17 00:00:00 2001 From: Pilot Date: Sat, 31 Oct 2020 18:11:54 -0400 Subject: [PATCH 2/3] 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 --- 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 9c3fcd7fbf..2e44e58f5b 100644 --- a/test/unit/adapters/http.js +++ b/test/unit/adapters/http.js @@ -369,13 +369,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) { From b2d30cfa4113b75686cd1a3e4d5b9547e86de218 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Tue, 27 Oct 2020 13:36:32 +0100 Subject: [PATCH 3/3] Updating axios in types to be lower case (#2797) Co-authored-by: Xianming Zhong --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index c860d8662c..5ea0be90af 100644 --- a/index.d.ts +++ b/index.d.ts @@ -155,6 +155,6 @@ export interface AxiosStatic extends AxiosInstance { spread(callback: (...args: T[]) => R): (array: T[]) => R; } -declare const Axios: AxiosStatic; +declare const axios: AxiosStatic; -export default Axios; +export default axios;