Skip to content

Commit d979ed9

Browse files
committed
wip
1 parent 90029fd commit d979ed9

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

test/Client.test.js

+17-15
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ const helper = require('./helper');
77
const config = require('./fixtures/client-config/webpack.config');
88
const runBrowser = require('./helpers/run-browser');
99

10-
function startProxy(port) {
11-
const proxy = express();
12-
proxy.use(
13-
'/',
14-
httpProxy({
15-
target: 'http://localhost:9001',
16-
ws: true,
17-
changeOrigin: true,
18-
})
19-
);
20-
return proxy.listen(port);
21-
}
22-
2310
describe('Client code', () => {
11+
function startProxy(port) {
12+
const proxy = express();
13+
proxy.use(
14+
'/',
15+
httpProxy({
16+
target: 'http://localhost:9001',
17+
ws: true,
18+
changeOrigin: true,
19+
})
20+
);
21+
return proxy.listen(port);
22+
}
23+
2424
beforeAll((done) => {
2525
const options = {
2626
compress: true,
@@ -47,8 +47,10 @@ describe('Client code', () => {
4747
proxy = startProxy(9000);
4848
});
4949

50-
afterAll(() => {
51-
proxy.close();
50+
afterAll((done) => {
51+
proxy.close(() => {
52+
done;
53+
});
5254
});
5355

5456
it('responds with a 200', (done) => {

0 commit comments

Comments
 (0)