Skip to content

Commit 9eb19e1

Browse files
committed
Use localhost as proxy target in test to avoid appveyor node 6 EADDRNOTAVAIL issue
1 parent d971283 commit 9eb19e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/Client.test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function startProxy(port) {
1313
proxy.use(
1414
'/',
1515
httpProxy({
16-
target: 'http://0.0.0.0:8080',
16+
target: 'http://localhost:8080',
1717
ws: true,
1818
changeOrigin: true,
1919
})
@@ -45,15 +45,15 @@ describe('Client code', () => {
4545
jest.setTimeout(30000);
4646

4747
beforeAll(() => {
48-
proxy = startProxy(9050);
48+
proxy = startProxy(9000);
4949
});
5050

5151
afterAll(() => {
5252
proxy.close();
5353
});
5454

5555
it('responds with a 200', (done) => {
56-
const req = request('http://localhost:9050');
56+
const req = request('http://localhost:9000');
5757
req.get('/sockjs-node').expect(200, 'Welcome to SockJS!\n', done);
5858
});
5959

@@ -63,12 +63,12 @@ describe('Client code', () => {
6363
.waitForRequest((requestObj) => requestObj.url().match(/sockjs-node/))
6464
.then((requestObj) => {
6565
expect(requestObj.url()).toMatch(
66-
/^http:\/\/localhost:9050\/sockjs-node/
66+
/^http:\/\/localhost:9000\/sockjs-node/
6767
);
6868
browser.close();
6969
done();
7070
});
71-
page.goto('http://localhost:9050/main');
71+
page.goto('http://localhost:9000/main');
7272
});
7373
});
7474
});

0 commit comments

Comments
 (0)