aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jest.config.js1
-rw-r--r--jsdom-workaround.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js
index e972c2d..1172605 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -1,6 +1,7 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
+ setupFiles: ['./jsdom-workaround.js'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.spec.json',
diff --git a/jsdom-workaround.js b/jsdom-workaround.js
new file mode 100644
index 0000000..63e15a8
--- /dev/null
+++ b/jsdom-workaround.js
@@ -0,0 +1,4 @@
+// Workaround for jsdom issue: https://github.com/jsdom/jsdom/issues/2961
+if (typeof globalThis === 'undefined') {
+ global.globalThis = global;
+}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.