Page MenuHomePhorge

D7019.1765061987.diff
No OneTemporary

Size
658 B
Referenced Files
None
Subscribers
None

D7019.1765061987.diff

diff --git a/web/jest-setup.js b/web/jest-setup.js
new file mode 100644
--- /dev/null
+++ b/web/jest-setup.js
@@ -0,0 +1,8 @@
+// @flow
+
+import crypto from 'crypto';
+
+// crypto.webcrypto was introduced in Node 15.10.0.
+// It is not defined in flow-typed so we need a cast
+// eslint-disable-next-line no-undef -- "global is not defined"
+global.crypto = (crypto: any).webcrypto;
diff --git a/web/package.json b/web/package.json
--- a/web/package.json
+++ b/web/package.json
@@ -95,6 +95,9 @@
],
"moduleNameMapper": {
"\\.(css)$": "identity-obj-proxy"
- }
+ },
+ "setupFiles": [
+ "<rootDir>/jest-setup.js"
+ ]
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 10:59 PM (55 m, 6 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5841319
Default Alt Text
D7019.1765061987.diff (658 B)

Event Timeline