Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

test: use linkedom in jest for tests

thecodrr854ffaa8c44e
diff --git a/packages/core/jest.setup.js b/packages/core/jest.setup.js
index ff15c13e6..066cc6510 100644
--- a/packages/core/jest.setup.js
+++ b/packages/core/jest.setup.js
@@ -1,8 +1,10 @@
var nodeCrypto = require("crypto");
var dotenv = require("dotenv");
const fetch = require("node-fetch");
+const linkedom = require("linkedom");
+globalThis.DOMParser = linkedom.DOMParser;
globalThis.fetch = fetch;
-require("abortcontroller-polyfill/dist/polyfill-patch-fetch")
+require("abortcontroller-polyfill/dist/polyfill-patch-fetch");
dotenv.config();