summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/setupTests.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/server/src/setupTests.ts b/packages/server/src/setupTests.ts
index 103e5fa..b23ac59 100644
--- a/packages/server/src/setupTests.ts
+++ b/packages/server/src/setupTests.ts
@@ -1,4 +1,18 @@
+import { webcrypto } from 'node:crypto';
// Silence some console output
// jest.spyOn(console, 'log').mockImplementation();
// jest.spyOn(console, 'debug').mockImplementation();
// jest.spyOn(console, 'error').mockImplementation();
+
+/**
+ * We can use this to test runtimes in which the WebCrypto API is available
+ * on `globalThis.crypto`
+ *
+ * This shouldn't be needed anymore once we move support to Node 19+ See here:
+ * https://nodejs.org/docs/latest-v19.x/api/webcrypto.html#web-crypto-api
+ */
+// Object.defineProperty(globalThis, 'crypto', {
+// get(){
+// return webcrypto;
+// },
+// });