summary refs log tree commit diff
path: root/util/tests/setupJest.js
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-15 11:13:21 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-15 11:13:21 +0200
commit1a94fb1208bf0e4c669cad16aff5f57dc0bf7a3c (patch)
tree1035116ddbaacc5fcc5ae250a6592eb88f78f75c /util/tests/setupJest.js
parentDo the funny thing (make user->invite cascade delet) (diff)
parentchange dev panel path, we missed this one... (diff)
downloadserver-1a94fb1208bf0e4c669cad16aff5f57dc0bf7a3c.tar.xz
Merge branch 'dev/restructure' into staging
Diffstat (limited to 'util/tests/setupJest.js')
-rw-r--r--util/tests/setupJest.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/util/tests/setupJest.js b/util/tests/setupJest.js
deleted file mode 100644

index 378d72d5..00000000 --- a/util/tests/setupJest.js +++ /dev/null
@@ -1,23 +0,0 @@ -const { performance } = require("perf_hooks"); -const fs = require("fs"); -const path = require("path"); - -// fs.unlinkSync(path.join(__dirname, "..", "database.db")); - -global.expect.extend({ - toBeFasterThan: async (func, target) => { - const start = performance.now(); - let error; - try { - await func(); - } catch (e) { - error = e.toString(); - } - const time = performance.now() - start; - - return { - pass: time < target && !error, - message: () => error || `${func.name} took ${time}ms of maximum ${target}`, - }; - }, -});