Skip to content

Commit 07f5e18

Browse files
committed
Work around nock error
Signed-off-by: Rafael Sofi-zada <rafa.sofizadeh@gmail.com>
1 parent 38376ac commit 07f5e18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/local-relay/src/RelayServer.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as net from 'net';
22
import * as websocket from 'websocket';
3+
import * as nock from 'nock';
34
import supertest from 'supertest';
45

56
import Host from './Host';
@@ -16,7 +17,7 @@ beforeAll(() => {
1617
const port = server.listen();
1718

1819
httpRequest = supertest(server.httpServer);
19-
wsUrl = `ws://localhost:${port}`;
20+
wsUrl = `ws://127.0.0.1:${port}`;
2021
});
2122

2223
afterEach(() => {
@@ -25,6 +26,7 @@ afterEach(() => {
2526

2627
afterAll(() => {
2728
server.close();
29+
nock.cleanAll();
2830
});
2931

3032
describe('port', () => {

0 commit comments

Comments
 (0)