mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user