Skip to content

Commit 8b0f373

Browse files
timemachine3030Pilotremcohaszingchinesedfanjasonsaayman
authored
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 <chinesedfan@qq.com> Co-authored-by: Pilot <timemachine@ctrl-c.club> Co-authored-by: Remco Haszing <remcohaszing@gmail.com> Co-authored-by: Xianming Zhong <chinesedfan@qq.com> Co-authored-by: Jay <jasonsaayman@gmail.com>
1 parent e426910 commit 8b0f373

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/unit/adapters/http.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,20 @@ describe('supports http with nodejs', function () {
370370
});
371371

372372
it('should support sockets', function (done) {
373+
// Different sockets for win32 vs darwin/linux
374+
var socketName = './test.sock';
375+
376+
if (process.platform === 'win32') {
377+
socketName = '\\\\.\\pipe\\libuv-test';
378+
}
379+
373380
server = net.createServer(function (socket) {
374381
socket.on('data', function () {
375382
socket.end('HTTP/1.1 200 OK\r\n\r\n');
376383
});
377-
}).listen('./test.sock', function () {
384+
}).listen(socketName, function () {
378385
axios({
379-
socketPath: './test.sock',
386+
socketPath: socketName,
380387
url: '/'
381388
})
382389
.then(function (resp) {

0 commit comments

Comments
 (0)