Page MenuHomePhabricator

D7019.diff
No OneTemporary

D7019.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 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
@@ -97,6 +97,9 @@
],
"moduleNameMapper": {
"\\.(css)$": "identity-obj-proxy"
- }
+ },
+ "setupFiles": [
+ "<rootDir>/jest-setup.js"
+ ]
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 22, 2:04 AM (6 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2339519
Default Alt Text
D7019.diff (652 B)

Event Timeline