From 636f711fc8a96e699e0495d346cfd6b0435b48b7 Mon Sep 17 00:00:00 2001
From: Richard Petersen <richard.petersen@open-xchange.com>
Date: Wed, 23 Feb 2022 16:21:06 +0100
Subject: [PATCH] Cleanup

---
 spec/util.js | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/spec/util.js b/spec/util.js
index 93c5823..6449dbf 100644
--- a/spec/util.js
+++ b/spec/util.js
@@ -1,32 +1,8 @@
-import express from 'express'
 import * as td from 'testdouble'
 import { register } from 'prom-client'
 import request from 'supertest'
 import { Response } from 'node-fetch'
 
-// TODO remove this
-export function getRandomPort () {
-  return 1000 + (Math.random() * 39000) >> 0
-}
-
-// TODO remove this
-export async function createMockServer ({ port }) {
-  const app = express()
-  const server = await new Promise(resolve => {
-    const server = app.listen(port, () => resolve(server))
-  })
-  server.respondWith = function (routes) {
-    for (const [route, data] of Object.entries(routes)) {
-      if (typeof data === 'function') {
-        app.get(route, data)
-      } else {
-        app.get(route, (req, res) => res.json(data))
-      }
-    }
-  }
-  return server
-}
-
 export function generateSimpleViteManifest (mapping) {
   const viteManifest = {}
   for (const [file, value] of Object.entries(mapping)) {
-- 
GitLab