aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/shared/mock-servers/mock-http.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/shared/mock-servers/mock-http.ts')
-rw-r--r--server/tests/shared/mock-servers/mock-http.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/server/tests/shared/mock-servers/mock-http.ts b/server/tests/shared/mock-servers/mock-http.ts
deleted file mode 100644
index b7a019e07..000000000
--- a/server/tests/shared/mock-servers/mock-http.ts
+++ /dev/null
@@ -1,23 +0,0 @@
1import express from 'express'
2import { Server } from 'http'
3import { getPort, randomListen, terminateServer } from './shared'
4
5export class MockHTTP {
6 private server: Server
7
8 async initialize () {
9 const app = express()
10
11 app.get('/*', (req: express.Request, res: express.Response, next: express.NextFunction) => {
12 return res.sendStatus(200)
13 })
14
15 this.server = await randomListen(app)
16
17 return getPort(this.server)
18 }
19
20 terminate () {
21 return terminateServer(this.server)
22 }
23}