Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use different socket for Win32 test #3375

Merged
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