From 70430c2796b6c0455a863edc62760a3d45951fc5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Sep 2021 08:13:11 +0200 Subject: Wait mock server termination --- shared/extra-utils/mock-servers/mock-proxy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/mock-servers/mock-proxy.ts') 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 @@ import { createServer, Server } from 'http' import proxy from 'proxy' import { randomInt } from '@shared/core-utils' +import { terminateServer } from './utils' class MockProxy { private server: Server @@ -16,7 +17,7 @@ class MockProxy { } terminate () { - if (this.server) this.server.close() + return terminateServer(this.server) } } -- cgit v1.2.3