aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/mock-servers/mock-proxy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-09-06 08:13:11 +0200
committerChocobozzz <me@florianbigard.com>2021-09-06 08:13:11 +0200
commit70430c2796b6c0455a863edc62760a3d45951fc5 (patch)
tree7620d5a8db0c9b6cbf5a11d1c794875402828789 /shared/extra-utils/mock-servers/mock-proxy.ts
parent6d210220be0875d63461829d83c6e3a59d05cf7a (diff)
downloadPeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.tar.gz
PeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.tar.zst
PeerTube-70430c2796b6c0455a863edc62760a3d45951fc5.zip
Wait mock server termination
Diffstat (limited to 'shared/extra-utils/mock-servers/mock-proxy.ts')
-rw-r--r--shared/extra-utils/mock-servers/mock-proxy.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/mock-servers/mock-proxy.ts b/shared/extra-utils/mock-servers/mock-proxy.ts
index eb5f177c7..f955d3f9e 100644
--- a/shared/extra-utils/mock-servers/mock-proxy.ts
+++ b/shared/extra-utils/mock-servers/mock-proxy.ts
@@ -2,6 +2,7 @@
2import { createServer, Server } from 'http' 2import { createServer, Server } from 'http'
3import proxy from 'proxy' 3import proxy from 'proxy'
4import { randomInt } from '@shared/core-utils' 4import { randomInt } from '@shared/core-utils'
5import { terminateServer } from './utils'
5 6
6class MockProxy { 7class MockProxy {
7 private server: Server 8 private server: Server
@@ -16,7 +17,7 @@ class MockProxy {
16 } 17 }
17 18
18 terminate () { 19 terminate () {
19 if (this.server) this.server.close() 20 return terminateServer(this.server)
20 } 21 }
21} 22}
22 23