Skip to content

Commit

Permalink
Use different socket for Win32 test (#3375)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
5 people committed Dec 9, 2020
1 parent e426910 commit 8b0f373
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/unit/adapters/http.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 8b0f373

Please sign in to comment.