diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json
index fb29b869d..93a93aa1d 100644
--- a/lavamoat/browserify/beta/policy.json
+++ b/lavamoat/browserify/beta/policy.json
@@ -425,8 +425,8 @@
"packages": {
"@ngraveio/bc-ur": true,
"browserify>buffer": true,
- "enzyme>cheerio>tslib": true,
- "ethereumjs-wallet>bs58check": true
+ "ethereumjs-wallet>bs58check": true,
+ "wait-on>rxjs>tslib": true
}
},
"@keystonehq/bc-ur-registry-eth>hdkey": {
@@ -1025,8 +1025,8 @@
"packages": {
"@metamask/eth-token-tracker>deep-equal>is-arguments": true,
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
- "enzyme>is-regex": true,
- "enzyme>object-is": true,
+ "@ngraveio/bc-ur>assert>object-is": true,
+ "@storybook/api>telejson>is-regex": true,
"mocha>object.assign>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
@@ -1391,6 +1391,12 @@
"pubnub>cbor-sync": true
}
},
+ "@ngraveio/bc-ur>assert>object-is": {
+ "packages": {
+ "globalthis>define-properties": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@ngraveio/bc-ur>bignumber.js": {
"globals": {
"crypto": true,
@@ -1573,6 +1579,12 @@
"regeneratorRuntime": "write"
}
},
+ "@storybook/api>telejson>is-regex": {
+ "packages": {
+ "koa>is-generator-function>has-tostringtag": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@storybook/api>util-deprecate": {
"globals": {
"console.trace": true,
@@ -2335,6 +2347,11 @@
"console": true
}
},
+ "browserify>has": {
+ "packages": {
+ "mocha>object.assign>function-bind": true
+ }
+ },
"browserify>os-browserify": {
"globals": {
"location": true,
@@ -2492,28 +2509,6 @@
"pump>once": true
}
},
- "enzyme>cheerio>tslib": {
- "globals": {
- "define": true
- }
- },
- "enzyme>has": {
- "packages": {
- "mocha>object.assign>function-bind": true
- }
- },
- "enzyme>is-regex": {
- "packages": {
- "koa>is-generator-function>has-tostringtag": true,
- "string.prototype.matchall>call-bind": true
- }
- },
- "enzyme>object-is": {
- "packages": {
- "globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
- }
- },
"eslint>optionator>fast-levenshtein": {
"globals": {
"Intl": true,
@@ -2577,7 +2572,7 @@
"setTimeout": true
},
"packages": {
- "enzyme>cheerio>tslib": true
+ "wait-on>rxjs>tslib": true
}
},
"eth-json-rpc-middleware": {
@@ -4128,16 +4123,16 @@
"WeakRef": true
},
"packages": {
- "enzyme>has": true,
+ "browserify>has": true,
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"string.prototype.matchall>regexp.prototype.flags": {
"packages": {
- "enzyme>function.prototype.name>functions-have-names": true,
"globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>regexp.prototype.flags>functions-have-names": true
}
},
"uuid": {
@@ -4151,6 +4146,11 @@
"browserify>buffer": true
}
},
+ "wait-on>rxjs>tslib": {
+ "globals": {
+ "define": true
+ }
+ },
"web3": {
"globals": {
"XMLHttpRequest": true
diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json
index 50ea634e9..48c20441c 100644
--- a/lavamoat/browserify/flask/policy.json
+++ b/lavamoat/browserify/flask/policy.json
@@ -425,8 +425,8 @@
"packages": {
"@ngraveio/bc-ur": true,
"browserify>buffer": true,
- "enzyme>cheerio>tslib": true,
- "ethereumjs-wallet>bs58check": true
+ "ethereumjs-wallet>bs58check": true,
+ "wait-on>rxjs>tslib": true
}
},
"@keystonehq/bc-ur-registry-eth>hdkey": {
@@ -1025,8 +1025,8 @@
"packages": {
"@metamask/eth-token-tracker>deep-equal>is-arguments": true,
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
- "enzyme>is-regex": true,
- "enzyme>object-is": true,
+ "@ngraveio/bc-ur>assert>object-is": true,
+ "@storybook/api>telejson>is-regex": true,
"mocha>object.assign>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
@@ -1705,6 +1705,12 @@
"pubnub>cbor-sync": true
}
},
+ "@ngraveio/bc-ur>assert>object-is": {
+ "packages": {
+ "globalthis>define-properties": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@ngraveio/bc-ur>bignumber.js": {
"globals": {
"crypto": true,
@@ -1887,6 +1893,12 @@
"regeneratorRuntime": "write"
}
},
+ "@storybook/api>telejson>is-regex": {
+ "packages": {
+ "koa>is-generator-function>has-tostringtag": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@storybook/api>util-deprecate": {
"globals": {
"console.trace": true,
@@ -2649,6 +2661,11 @@
"console": true
}
},
+ "browserify>has": {
+ "packages": {
+ "mocha>object.assign>function-bind": true
+ }
+ },
"browserify>os-browserify": {
"globals": {
"location": true,
@@ -2806,28 +2823,6 @@
"pump>once": true
}
},
- "enzyme>cheerio>tslib": {
- "globals": {
- "define": true
- }
- },
- "enzyme>has": {
- "packages": {
- "mocha>object.assign>function-bind": true
- }
- },
- "enzyme>is-regex": {
- "packages": {
- "koa>is-generator-function>has-tostringtag": true,
- "string.prototype.matchall>call-bind": true
- }
- },
- "enzyme>object-is": {
- "packages": {
- "globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
- }
- },
"eslint>optionator>fast-levenshtein": {
"globals": {
"Intl": true,
@@ -2891,7 +2886,7 @@
"setTimeout": true
},
"packages": {
- "enzyme>cheerio>tslib": true
+ "wait-on>rxjs>tslib": true
}
},
"eth-json-rpc-middleware": {
@@ -4574,16 +4569,16 @@
"WeakRef": true
},
"packages": {
- "enzyme>has": true,
+ "browserify>has": true,
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"string.prototype.matchall>regexp.prototype.flags": {
"packages": {
- "enzyme>function.prototype.name>functions-have-names": true,
"globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>regexp.prototype.flags>functions-have-names": true
}
},
"terser>source-map-support>buffer-from": {
@@ -4607,6 +4602,11 @@
"browserify>path-browserify": true
}
},
+ "wait-on>rxjs>tslib": {
+ "globals": {
+ "define": true
+ }
+ },
"web3": {
"globals": {
"XMLHttpRequest": true
diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json
index fb29b869d..93a93aa1d 100644
--- a/lavamoat/browserify/main/policy.json
+++ b/lavamoat/browserify/main/policy.json
@@ -425,8 +425,8 @@
"packages": {
"@ngraveio/bc-ur": true,
"browserify>buffer": true,
- "enzyme>cheerio>tslib": true,
- "ethereumjs-wallet>bs58check": true
+ "ethereumjs-wallet>bs58check": true,
+ "wait-on>rxjs>tslib": true
}
},
"@keystonehq/bc-ur-registry-eth>hdkey": {
@@ -1025,8 +1025,8 @@
"packages": {
"@metamask/eth-token-tracker>deep-equal>is-arguments": true,
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
- "enzyme>is-regex": true,
- "enzyme>object-is": true,
+ "@ngraveio/bc-ur>assert>object-is": true,
+ "@storybook/api>telejson>is-regex": true,
"mocha>object.assign>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
@@ -1391,6 +1391,12 @@
"pubnub>cbor-sync": true
}
},
+ "@ngraveio/bc-ur>assert>object-is": {
+ "packages": {
+ "globalthis>define-properties": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@ngraveio/bc-ur>bignumber.js": {
"globals": {
"crypto": true,
@@ -1573,6 +1579,12 @@
"regeneratorRuntime": "write"
}
},
+ "@storybook/api>telejson>is-regex": {
+ "packages": {
+ "koa>is-generator-function>has-tostringtag": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@storybook/api>util-deprecate": {
"globals": {
"console.trace": true,
@@ -2335,6 +2347,11 @@
"console": true
}
},
+ "browserify>has": {
+ "packages": {
+ "mocha>object.assign>function-bind": true
+ }
+ },
"browserify>os-browserify": {
"globals": {
"location": true,
@@ -2492,28 +2509,6 @@
"pump>once": true
}
},
- "enzyme>cheerio>tslib": {
- "globals": {
- "define": true
- }
- },
- "enzyme>has": {
- "packages": {
- "mocha>object.assign>function-bind": true
- }
- },
- "enzyme>is-regex": {
- "packages": {
- "koa>is-generator-function>has-tostringtag": true,
- "string.prototype.matchall>call-bind": true
- }
- },
- "enzyme>object-is": {
- "packages": {
- "globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
- }
- },
"eslint>optionator>fast-levenshtein": {
"globals": {
"Intl": true,
@@ -2577,7 +2572,7 @@
"setTimeout": true
},
"packages": {
- "enzyme>cheerio>tslib": true
+ "wait-on>rxjs>tslib": true
}
},
"eth-json-rpc-middleware": {
@@ -4128,16 +4123,16 @@
"WeakRef": true
},
"packages": {
- "enzyme>has": true,
+ "browserify>has": true,
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"string.prototype.matchall>regexp.prototype.flags": {
"packages": {
- "enzyme>function.prototype.name>functions-have-names": true,
"globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>regexp.prototype.flags>functions-have-names": true
}
},
"uuid": {
@@ -4151,6 +4146,11 @@
"browserify>buffer": true
}
},
+ "wait-on>rxjs>tslib": {
+ "globals": {
+ "define": true
+ }
+ },
"web3": {
"globals": {
"XMLHttpRequest": true
diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json
index 888c48556..59bdb76be 100644
--- a/lavamoat/build-system/policy.json
+++ b/lavamoat/build-system/policy.json
@@ -1119,6 +1119,12 @@
"path.resolve": true
}
},
+ "@storybook/api>telejson>is-regex": {
+ "packages": {
+ "koa>is-generator-function>has-tostringtag": true,
+ "string.prototype.matchall>call-bind": true
+ }
+ },
"@storybook/api>telejson>is-symbol": {
"packages": {
"string.prototype.matchall>has-symbols": true
@@ -1411,14 +1417,14 @@
"brfs>static-module>acorn-node": true,
"brfs>static-module>magic-string": true,
"brfs>static-module>merge-source-map": true,
+ "brfs>static-module>object-inspect": true,
"brfs>static-module>scope-analyzer": true,
"brfs>static-module>shallow-copy": true,
"brfs>static-module>static-eval": true,
"brfs>static-module>through2": true,
"browserify>concat-stream": true,
"browserify>duplexer2": true,
- "enzyme>has": true,
- "enzyme>object-inspect": true,
+ "browserify>has": true,
"jsdom>escodegen": true,
"nyc>convert-source-map": true,
"readable-stream": true
@@ -1456,6 +1462,15 @@
"brfs>static-module>merge-source-map>source-map": true
}
},
+ "brfs>static-module>object-inspect": {
+ "builtin": {
+ "util.inspect": true
+ },
+ "globals": {
+ "HTMLElement": true,
+ "WeakRef": true
+ }
+ },
"brfs>static-module>scope-analyzer": {
"builtin": {
"assert.ok": true,
@@ -1551,13 +1566,13 @@
"browserify>cached-path-relative": true,
"browserify>concat-stream": true,
"browserify>deps-sort": true,
+ "browserify>has": true,
"browserify>insert-module-globals": true,
"browserify>module-deps": true,
"browserify>read-only-stream": true,
"browserify>shasum": true,
"browserify>syntax-error": true,
"browserify>through2": true,
- "enzyme>has": true,
"labeled-stream-splicer": true,
"lavamoat>htmlescape": true,
"pumpify>inherits": true,
@@ -1680,6 +1695,11 @@
"readable-stream": true
}
},
+ "browserify>has": {
+ "packages": {
+ "mocha>object.assign>function-bind": true
+ }
+ },
"browserify>insert-module-globals": {
"builtin": {
"path.dirname": true,
@@ -2168,7 +2188,7 @@
"process.versions": true
},
"packages": {
- "enzyme>has": true
+ "browserify>has": true
}
},
"depcheck>json5": {
@@ -2243,64 +2263,6 @@
"pump>once": true
}
},
- "enzyme>array.prototype.flat": {
- "packages": {
- "enzyme>array.prototype.flat>es-shim-unscopables": true,
- "globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true,
- "string.prototype.matchall>es-abstract": true
- }
- },
- "enzyme>array.prototype.flat>es-shim-unscopables": {
- "packages": {
- "enzyme>has": true
- }
- },
- "enzyme>has": {
- "packages": {
- "mocha>object.assign>function-bind": true
- }
- },
- "enzyme>is-callable": {
- "globals": {
- "document": true
- }
- },
- "enzyme>is-regex": {
- "packages": {
- "koa>is-generator-function>has-tostringtag": true,
- "string.prototype.matchall>call-bind": true
- }
- },
- "enzyme>is-string": {
- "packages": {
- "koa>is-generator-function>has-tostringtag": true
- }
- },
- "enzyme>object-inspect": {
- "builtin": {
- "util.inspect": true
- },
- "globals": {
- "HTMLElement": true,
- "WeakRef": true
- }
- },
- "enzyme>object.assign": {
- "packages": {
- "globalthis>define-properties": true,
- "mocha>object.assign>object-keys": true,
- "string.prototype.matchall>call-bind": true,
- "string.prototype.matchall>has-symbols": true
- }
- },
- "enzyme>object.entries": {
- "packages": {
- "globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true,
- "string.prototype.matchall>es-abstract": true
- }
- },
"eslint": {
"builtin": {
"assert": true,
@@ -2419,21 +2381,29 @@
"process.env": true
},
"packages": {
+ "browserify>has": true,
"depcheck>is-core-module": true,
- "enzyme>array.prototype.flat": true,
- "enzyme>has": true,
- "enzyme>object.values": true,
"eslint": true,
+ "eslint-plugin-import>array.prototype.flat": true,
"eslint-plugin-import>debug": true,
"eslint-plugin-import>doctrine": true,
"eslint-plugin-import>eslint-module-utils": true,
"eslint-plugin-import>tsconfig-paths": true,
"eslint-plugin-react>array-includes": true,
+ "eslint-plugin-react>object.values": true,
"eslint>is-glob": true,
"eslint>minimatch": true,
"typescript": true
}
},
+ "eslint-plugin-import>array.prototype.flat": {
+ "packages": {
+ "eslint-plugin-react>array.prototype.flatmap>es-shim-unscopables": true,
+ "globalthis>define-properties": true,
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>es-abstract": true
+ }
+ },
"eslint-plugin-import>debug": {
"builtin": {
"fs.SyncWriteStream": true,
@@ -2752,15 +2722,15 @@
"process.cwd": true
},
"packages": {
- "enzyme>object.entries": true,
- "enzyme>object.values": true,
"eslint": true,
"eslint-plugin-react>array-includes": true,
"eslint-plugin-react>array.prototype.flatmap": true,
"eslint-plugin-react>doctrine": true,
"eslint-plugin-react>estraverse": true,
"eslint-plugin-react>jsx-ast-utils": true,
+ "eslint-plugin-react>object.entries": true,
"eslint-plugin-react>object.hasown": true,
+ "eslint-plugin-react>object.values": true,
"eslint-plugin-react>resolve": true,
"eslint-plugin-react>semver": true,
"eslint>minimatch": true,
@@ -2776,21 +2746,31 @@
},
"eslint-plugin-react>array-includes": {
"packages": {
- "enzyme>is-string": true,
+ "eslint-plugin-react>array-includes>is-string": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true,
"string.prototype.matchall>get-intrinsic": true
}
},
+ "eslint-plugin-react>array-includes>is-string": {
+ "packages": {
+ "koa>is-generator-function>has-tostringtag": true
+ }
+ },
"eslint-plugin-react>array.prototype.flatmap": {
"packages": {
- "enzyme>array.prototype.flat>es-shim-unscopables": true,
+ "eslint-plugin-react>array.prototype.flatmap>es-shim-unscopables": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true
}
},
+ "eslint-plugin-react>array.prototype.flatmap>es-shim-unscopables": {
+ "packages": {
+ "browserify>has": true
+ }
+ },
"eslint-plugin-react>doctrine": {
"builtin": {
"assert": true
@@ -2804,7 +2784,14 @@
"console.error": true
},
"packages": {
- "enzyme>object.assign": true
+ "gulp>vinyl-fs>object.assign": true
+ }
+ },
+ "eslint-plugin-react>object.entries": {
+ "packages": {
+ "globalthis>define-properties": true,
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>es-abstract": true
}
},
"eslint-plugin-react>object.hasown": {
@@ -4672,7 +4659,7 @@
},
"gulp-watch>chokidar>braces>to-regex>safe-regex": {
"packages": {
- "enzyme>rst-selector-parser>nearley>randexp>ret": true
+ "gulp-watch>chokidar>braces>to-regex>safe-regex>ret": true
}
},
"gulp-watch>chokidar>fsevents": {
@@ -5623,12 +5610,12 @@
"process.nextTick": true
},
"packages": {
- "enzyme>object.assign": true,
"gulp>vinyl-fs>fs-mkdirp-stream": true,
"gulp>vinyl-fs>glob-stream": true,
"gulp>vinyl-fs>is-valid-glob": true,
"gulp>vinyl-fs>lazystream": true,
"gulp>vinyl-fs>lead": true,
+ "gulp>vinyl-fs>object.assign": true,
"gulp>vinyl-fs>pumpify": true,
"gulp>vinyl-fs>remove-bom-buffer": true,
"gulp>vinyl-fs>remove-bom-stream": true,
@@ -5801,6 +5788,14 @@
"readable-stream": true
}
},
+ "gulp>vinyl-fs>object.assign": {
+ "packages": {
+ "globalthis>define-properties": true,
+ "mocha>object.assign>object-keys": true,
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>has-symbols": true
+ }
+ },
"gulp>vinyl-fs>pumpify": {
"packages": {
"gulp>vinyl-fs>pumpify>duplexify": true,
@@ -6812,14 +6807,14 @@
},
"string.prototype.matchall>es-abstract": {
"packages": {
- "enzyme>has": true,
- "enzyme>is-callable": true,
- "enzyme>is-regex": true,
- "enzyme>is-string": true,
- "enzyme>object-inspect": true,
+ "@storybook/api>telejson>is-regex": true,
+ "brfs>static-module>object-inspect": true,
+ "browserify>has": true,
+ "eslint-plugin-react>array-includes>is-string": true,
"globalthis>define-properties>has-property-descriptors": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract>es-to-primitive": true,
+ "string.prototype.matchall>es-abstract>is-callable": true,
"string.prototype.matchall>get-intrinsic": true,
"string.prototype.matchall>has-symbols": true,
"string.prototype.matchall>internal-slot": true
@@ -6829,7 +6824,12 @@
"packages": {
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@storybook/api>telejson>is-symbol": true,
- "enzyme>is-callable": true
+ "string.prototype.matchall>es-abstract>is-callable": true
+ }
+ },
+ "string.prototype.matchall>es-abstract>is-callable": {
+ "globals": {
+ "document": true
}
},
"string.prototype.matchall>get-intrinsic": {
@@ -6839,28 +6839,28 @@
"WeakRef": true
},
"packages": {
- "enzyme>has": true,
+ "browserify>has": true,
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"string.prototype.matchall>internal-slot": {
"packages": {
- "enzyme>has": true,
+ "browserify>has": true,
"string.prototype.matchall>get-intrinsic": true,
"string.prototype.matchall>side-channel": true
}
},
"string.prototype.matchall>regexp.prototype.flags": {
"packages": {
- "enzyme>function.prototype.name>functions-have-names": true,
"globalthis>define-properties": true,
- "string.prototype.matchall>call-bind": true
+ "string.prototype.matchall>call-bind": true,
+ "string.prototype.matchall>regexp.prototype.flags>functions-have-names": true
}
},
"string.prototype.matchall>side-channel": {
"packages": {
- "enzyme>object-inspect": true,
+ "brfs>static-module>object-inspect": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
diff --git a/package.json b/package.json
index 2522b1e1c..2cbe7d0c4 100644
--- a/package.json
+++ b/package.json
@@ -436,8 +436,6 @@
"depcheck": "^1.4.3",
"dependency-tree": "^8.1.2",
"duplexify": "^4.1.1",
- "enzyme": "^3.10.0",
- "enzyme-adapter-react-16": "^1.15.1",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-node": "^0.3.4",
diff --git a/test/helpers/setup-helper.js b/test/helpers/setup-helper.js
index 619438e36..75da079f3 100644
--- a/test/helpers/setup-helper.js
+++ b/test/helpers/setup-helper.js
@@ -1,8 +1,6 @@
/* eslint-disable-next-line */
import { TextEncoder, TextDecoder } from 'util';
import nock from 'nock';
-import Enzyme from 'enzyme';
-import Adapter from 'enzyme-adapter-react-16';
import log from 'loglevel';
import { JSDOM } from 'jsdom';
@@ -43,8 +41,6 @@ process.on('exit', () => {
}
});
-Enzyme.configure({ adapter: new Adapter() });
-
log.setDefaultLevel(5);
global.log = log;
diff --git a/test/lib/render-helpers.js b/test/lib/render-helpers.js
index f407392ba..36b907037 100644
--- a/test/lib/render-helpers.js
+++ b/test/lib/render-helpers.js
@@ -2,8 +2,7 @@ import React, { useMemo, useState } from 'react';
import { Provider } from 'react-redux';
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { mount, shallow } from 'enzyme';
-import { Router, MemoryRouter } from 'react-router-dom';
+import { Router } from 'react-router-dom';
import PropTypes from 'prop-types';
import { createMemoryHistory } from 'history';
import { I18nContext, LegacyI18nProvider } from '../../ui/contexts/i18n';
@@ -11,50 +10,6 @@ import { LegacyMetaMetricsProvider } from '../../ui/contexts/metametrics';
import { getMessage } from '../../ui/helpers/utils/i18n-helper';
import * as en from '../../app/_locales/en/messages.json';
-export function shallowWithContext(jsxComponent) {
- return shallow(jsxComponent, {
- context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) },
- });
-}
-
-export function mountWithRouter(component, store = {}, pathname = '/') {
- // Instantiate router context
- const router = {
- history: new MemoryRouter().history,
- route: {
- location: {
- pathname,
- },
- match: {},
- },
- };
-
- const createContext = () => ({
- context: {
- router,
- t: (str) => str,
- metricsEvent: () => undefined,
- trackEvent: () => undefined,
- store,
- },
- childContextTypes: {
- router: PropTypes.object,
- t: PropTypes.func,
- metricsEvent: PropTypes.func,
- trackEvent: PropTypes.func,
- store: PropTypes.object,
- },
- });
-
- const Wrapper = () => (
-
- {component}
-
- );
-
- return mount(, createContext());
-}
-
export const I18nProvider = (props) => {
const { currentLocale, current, en: eng } = props;
diff --git a/yarn.lock b/yarn.lock
index 4b20541e2..690401f17 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8827,26 +8827,6 @@ __metadata:
languageName: node
linkType: hard
-"airbnb-prop-types@npm:^2.15.0":
- version: 2.15.0
- resolution: "airbnb-prop-types@npm:2.15.0"
- dependencies:
- array.prototype.find: ^2.1.0
- function.prototype.name: ^1.1.1
- has: ^1.0.3
- is-regex: ^1.0.4
- object-is: ^1.0.1
- object.assign: ^4.1.0
- object.entries: ^1.1.0
- prop-types: ^15.7.2
- prop-types-exact: ^1.2.0
- react-is: ^16.9.0
- peerDependencies:
- react: ^0.14 || ^15.0.0 || ^16.0.0-alpha
- checksum: c7defd4ed396a132d781a23ef5343a8e86778bc2909ccfe0177a6c7f0592dd7a45e9113f28e8071518ef05d5f4601a98ca538df08d8aebeab660330b737c8a2a
- languageName: node
- linkType: hard
-
"ajv-errors@npm:^1.0.0":
version: 1.0.1
resolution: "ajv-errors@npm:1.0.1"
@@ -9300,13 +9280,6 @@ __metadata:
languageName: node
linkType: hard
-"array-filter@npm:^1.0.0":
- version: 1.0.0
- resolution: "array-filter@npm:1.0.0"
- checksum: 467054291f522d7f633b1f5e79aac9008ade50a7354e0178d9ec8f0091ec03bc19a41d4eb22985daf2279a5c27be6d7cf410733539e7fccb0742145b89aca438
- languageName: node
- linkType: hard
-
"array-find-index@npm:^1.0.1":
version: 1.0.2
resolution: "array-find-index@npm:1.0.2"
@@ -9415,16 +9388,6 @@ __metadata:
languageName: node
linkType: hard
-"array.prototype.find@npm:^2.1.0":
- version: 2.1.0
- resolution: "array.prototype.find@npm:2.1.0"
- dependencies:
- define-properties: ^1.1.3
- es-abstract: ^1.13.0
- checksum: 06129744cf968b7cc24151cf622114ad16f1efb587d20b8bb9a61180651079dd3cf8d589701e55f0d4be8d976ada86e74a60e15c7f58b9ec3a5724cdbc88432a
- languageName: node
- linkType: hard
-
"array.prototype.flat@npm:^1.2.1, array.prototype.flat@npm:^1.2.5":
version: 1.3.0
resolution: "array.prototype.flat@npm:1.3.0"
@@ -11648,7 +11611,7 @@ __metadata:
languageName: node
linkType: hard
-"cheerio@npm:1.0.0-rc.10, cheerio@npm:^1.0.0-rc.2":
+"cheerio@npm:1.0.0-rc.10":
version: 1.0.0-rc.10
resolution: "cheerio@npm:1.0.0-rc.10"
dependencies:
@@ -14042,13 +14005,6 @@ __metadata:
languageName: node
linkType: hard
-"discontinuous-range@npm:1.0.0":
- version: 1.0.0
- resolution: "discontinuous-range@npm:1.0.0"
- checksum: 8ee88d7082445b6eadc7c03bebe6dc978f96760c45e9f65d16ca66174d9e086a9e3855ee16acf65625e1a07a846a17de674f02a5964a6aebe5963662baf8b5c8
- languageName: node
- linkType: hard
-
"distributions@npm:^2.1.0":
version: 2.1.0
resolution: "distributions@npm:2.1.0"
@@ -14548,82 +14504,6 @@ __metadata:
languageName: node
linkType: hard
-"enzyme-adapter-react-16@npm:^1.15.1":
- version: 1.15.1
- resolution: "enzyme-adapter-react-16@npm:1.15.1"
- dependencies:
- enzyme-adapter-utils: ^1.12.1
- enzyme-shallow-equal: ^1.0.0
- has: ^1.0.3
- object.assign: ^4.1.0
- object.values: ^1.1.0
- prop-types: ^15.7.2
- react-is: ^16.10.2
- react-test-renderer: ^16.0.0-0
- semver: ^5.7.0
- peerDependencies:
- enzyme: ^3.0.0
- react: ^16.0.0-0
- react-dom: ^16.0.0-0
- checksum: 3ab66941cf11e7201e1cacc952d8b5e3c558b84c592757226fed73d0bb17e97b56b640779e88d2ea56a8a8318742b15c0bf2d0e905ef555e3690dd68b33dc942
- languageName: node
- linkType: hard
-
-"enzyme-adapter-utils@npm:^1.12.1":
- version: 1.12.1
- resolution: "enzyme-adapter-utils@npm:1.12.1"
- dependencies:
- airbnb-prop-types: ^2.15.0
- function.prototype.name: ^1.1.1
- object.assign: ^4.1.0
- object.fromentries: ^2.0.1
- prop-types: ^15.7.2
- semver: ^5.7.0
- peerDependencies:
- react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0
- checksum: e521ce6d701def1fee6dc84bb2bf6885cd582a0c0dde8df9bae663b9fcd0121f730c13f19192591bddf9e7248f295d89e57785b9d25d7d87e2456870e7262817
- languageName: node
- linkType: hard
-
-"enzyme-shallow-equal@npm:^1.0.0":
- version: 1.0.0
- resolution: "enzyme-shallow-equal@npm:1.0.0"
- dependencies:
- has: ^1.0.3
- object-is: ^1.0.1
- checksum: 0fa1a7631d4ef0b8d1d2679ae5d355c881e0281a0ae4c5a0707cd1be86609e9701c6d8444268e369255ceac849b8847203a102d056d806671902d1f10c9eb9cd
- languageName: node
- linkType: hard
-
-"enzyme@npm:^3.10.0":
- version: 3.10.0
- resolution: "enzyme@npm:3.10.0"
- dependencies:
- array.prototype.flat: ^1.2.1
- cheerio: ^1.0.0-rc.2
- function.prototype.name: ^1.1.0
- has: ^1.0.3
- html-element-map: ^1.0.0
- is-boolean-object: ^1.0.0
- is-callable: ^1.1.4
- is-number-object: ^1.0.3
- is-regex: ^1.0.4
- is-string: ^1.0.4
- is-subset: ^0.1.1
- lodash.escape: ^4.0.1
- lodash.isequal: ^4.5.0
- object-inspect: ^1.6.0
- object-is: ^1.0.1
- object.assign: ^4.1.0
- object.entries: ^1.0.4
- object.values: ^1.0.4
- raf: ^3.4.0
- rst-selector-parser: ^2.2.3
- string.prototype.trim: ^1.1.2
- checksum: 0045f1d0296be591c68b96c2f45a1adab526b27fab8be48c5b32153544738d2a07aa9ad9a55cfbed62d3615a88733aa9af23105b8a37c35e0143ef56a37bc401
- languageName: node
- linkType: hard
-
"err-code@npm:^2.0.2":
version: 2.0.3
resolution: "err-code@npm:2.0.3"
@@ -17571,7 +17451,7 @@ __metadata:
languageName: node
linkType: hard
-"function.prototype.name@npm:^1.1.0, function.prototype.name@npm:^1.1.1, function.prototype.name@npm:^1.1.5":
+"function.prototype.name@npm:^1.1.0, function.prototype.name@npm:^1.1.5":
version: 1.1.5
resolution: "function.prototype.name@npm:1.1.5"
dependencies:
@@ -19038,15 +18918,6 @@ __metadata:
languageName: node
linkType: hard
-"html-element-map@npm:^1.0.0":
- version: 1.2.0
- resolution: "html-element-map@npm:1.2.0"
- dependencies:
- array-filter: ^1.0.0
- checksum: b5e7cad2da46cce47b4b595f60a59eb3e933202030302885e705bef16bd2ac016d4a1bba1ef812c831802d04fc6b0c6d7d918c6fb069da6a61e7b7623f75124e
- languageName: node
- linkType: hard
-
"html-encoding-sniffer@npm:^1.0.1":
version: 1.0.2
resolution: "html-encoding-sniffer@npm:1.0.2"
@@ -19891,7 +19762,7 @@ __metadata:
languageName: node
linkType: hard
-"is-boolean-object@npm:^1.0.0, is-boolean-object@npm:^1.1.0":
+"is-boolean-object@npm:^1.1.0":
version: 1.1.2
resolution: "is-boolean-object@npm:1.1.2"
dependencies:
@@ -20276,7 +20147,7 @@ __metadata:
languageName: node
linkType: hard
-"is-number-object@npm:^1.0.3, is-number-object@npm:^1.0.4":
+"is-number-object@npm:^1.0.4":
version: 1.0.7
resolution: "is-number-object@npm:1.0.7"
dependencies:
@@ -20537,7 +20408,7 @@ __metadata:
languageName: node
linkType: hard
-"is-string@npm:^1.0.4, is-string@npm:^1.0.5, is-string@npm:^1.0.7":
+"is-string@npm:^1.0.5, is-string@npm:^1.0.7":
version: 1.0.7
resolution: "is-string@npm:1.0.7"
dependencies:
@@ -20546,13 +20417,6 @@ __metadata:
languageName: node
linkType: hard
-"is-subset@npm:^0.1.1":
- version: 0.1.1
- resolution: "is-subset@npm:0.1.1"
- checksum: 97b8d7852af165269b7495095691a6ce6cf20bdfa1f846f97b4560ee190069686107af4e277fbd93aa0845c4d5db704391460ff6e9014aeb73264ba87893df44
- languageName: node
- linkType: hard
-
"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3":
version: 1.0.4
resolution: "is-symbol@npm:1.0.4"
@@ -23331,13 +23195,6 @@ __metadata:
languageName: node
linkType: hard
-"lodash.escape@npm:^4.0.1":
- version: 4.0.1
- resolution: "lodash.escape@npm:4.0.1"
- checksum: fcb54f457497256964d619d5cccbd80a961916fca60df3fe0fa3e7f052715c2944c0ed5aefb4f9e047d127d44aa2d55555f3350cb42c6549e9e293fb30b41e7f
- languageName: node
- linkType: hard
-
"lodash.flattendeep@npm:^4.4.0":
version: 4.4.0
resolution: "lodash.flattendeep@npm:4.4.0"
@@ -23352,13 +23209,6 @@ __metadata:
languageName: node
linkType: hard
-"lodash.isequal@npm:^4.5.0":
- version: 4.5.0
- resolution: "lodash.isequal@npm:4.5.0"
- checksum: da27515dc5230eb1140ba65ff8de3613649620e8656b19a6270afe4866b7bd461d9ba2ac8a48dcc57f7adac4ee80e1de9f965d89d4d81a0ad52bb3eec2609644
- languageName: node
- linkType: hard
-
"lodash.isplainobject@npm:^4.0.6":
version: 4.0.6
resolution: "lodash.isplainobject@npm:4.0.6"
@@ -24299,8 +24149,6 @@ __metadata:
dependency-tree: ^8.1.2
duplexify: ^4.1.1
end-of-stream: ^1.4.4
- enzyme: ^3.10.0
- enzyme-adapter-react-16: ^1.15.1
eslint: ^8.20.0
eslint-config-prettier: ^8.5.0
eslint-import-resolver-node: ^0.3.4
@@ -25034,13 +24882,6 @@ __metadata:
languageName: node
linkType: hard
-"moo@npm:^0.4.3":
- version: 0.4.3
- resolution: "moo@npm:0.4.3"
- checksum: f13bfb22ea62fc1e3584029d2efd62add90bf1dcb14de2a1eb9d59552a7f2ac3710739c0270e525049e48e58105effd93f8563520d687cae1ab7d76216ff6c2b
- languageName: node
- linkType: hard
-
"move-concurrently@npm:^1.0.1":
version: 1.0.1
resolution: "move-concurrently@npm:1.0.1"
@@ -25315,24 +25156,6 @@ __metadata:
languageName: node
linkType: hard
-"nearley@npm:^2.7.10":
- version: 2.15.1
- resolution: "nearley@npm:2.15.1"
- dependencies:
- moo: ^0.4.3
- nomnom: ~1.6.2
- railroad-diagrams: ^1.0.0
- randexp: 0.4.6
- semver: ^5.4.1
- bin:
- nearley-railroad: bin/nearley-railroad.js
- nearley-test: bin/nearley-test.js
- nearley-unparse: bin/nearley-unparse.js
- nearleyc: bin/nearleyc.js
- checksum: 0de2658ac266f8175424d8ebb3bf867f77562c7268d9492b096c5304e09a1229fa48f05a57df17337066d1b31c89a59036f83a9a580018b969bd4c2c9ec611bc
- languageName: node
- linkType: hard
-
"needle@npm:^2.2.1":
version: 2.4.0
resolution: "needle@npm:2.4.0"
@@ -25659,16 +25482,6 @@ __metadata:
languageName: node
linkType: hard
-"nomnom@npm:~1.6.2":
- version: 1.6.2
- resolution: "nomnom@npm:1.6.2"
- dependencies:
- colors: 0.5.x
- underscore: ~1.4.4
- checksum: 9b116ddffae16ddc6081028efd26047cef9ad2af41bfddc87695f0ba61e5125a9a32eb53dcc3be4f333d886d08a595ad9c80f1b4c25495c61764af7a670d9768
- languageName: node
- linkType: hard
-
"nonce-tracker@npm:^1.0.0":
version: 1.0.1
resolution: "nonce-tracker@npm:1.0.1"
@@ -26079,7 +25892,7 @@ __metadata:
languageName: node
linkType: hard
-"object.entries@npm:^1.0.4, object.entries@npm:^1.1.0, object.entries@npm:^1.1.5":
+"object.entries@npm:^1.1.0, object.entries@npm:^1.1.5":
version: 1.1.5
resolution: "object.entries@npm:1.1.5"
dependencies:
@@ -26090,7 +25903,7 @@ __metadata:
languageName: node
linkType: hard
-"object.fromentries@npm:^2.0.0 || ^1.0.0, object.fromentries@npm:^2.0.1, object.fromentries@npm:^2.0.2, object.fromentries@npm:^2.0.5":
+"object.fromentries@npm:^2.0.0 || ^1.0.0, object.fromentries@npm:^2.0.2, object.fromentries@npm:^2.0.5":
version: 2.0.5
resolution: "object.fromentries@npm:2.0.5"
dependencies:
@@ -28010,17 +27823,6 @@ __metadata:
languageName: node
linkType: hard
-"prop-types-exact@npm:^1.2.0":
- version: 1.2.0
- resolution: "prop-types-exact@npm:1.2.0"
- dependencies:
- has: ^1.0.3
- object.assign: ^4.1.0
- reflect.ownkeys: ^0.2.0
- checksum: 21676a16d5b2623c345ca938554faba7bf29c6ad589eac3f490eda2207bcfd8d25cb3dfda5e5f8e6805239aabd2c6943f7bfbe726a1de708bae2b7a01c03eead
- languageName: node
- linkType: hard
-
"prop-types@npm:^15.0.0, prop-types@npm:^15.5.6, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1":
version: 15.8.1
resolution: "prop-types@npm:15.8.1"
@@ -28407,7 +28209,7 @@ __metadata:
languageName: node
linkType: hard
-"raf@npm:^3.1.0, raf@npm:^3.4.0":
+"raf@npm:^3.1.0":
version: 3.4.0
resolution: "raf@npm:3.4.0"
dependencies:
@@ -28416,13 +28218,6 @@ __metadata:
languageName: node
linkType: hard
-"railroad-diagrams@npm:^1.0.0":
- version: 1.0.0
- resolution: "railroad-diagrams@npm:1.0.0"
- checksum: 9e312af352b5ed89c2118edc0c06cef2cc039681817f65266719606e4e91ff6ae5374c707cc9033fe29a82c2703edf3c63471664f97f0167c85daf6f93496319
- languageName: node
- linkType: hard
-
"ramda@npm:^0.21.0":
version: 0.21.0
resolution: "ramda@npm:0.21.0"
@@ -28437,16 +28232,6 @@ __metadata:
languageName: node
linkType: hard
-"randexp@npm:0.4.6":
- version: 0.4.6
- resolution: "randexp@npm:0.4.6"
- dependencies:
- discontinuous-range: 1.0.0
- ret: ~0.1.10
- checksum: 3c0d440a3f89d6d36844aa4dd57b5cdb0cab938a41956a16da743d3a3578ab32538fc41c16cc0984b6938f2ae4cbc0216967e9829e52191f70e32690d8e3445d
- languageName: node
- linkType: hard
-
"randomatic@npm:^3.0.0":
version: 3.0.0
resolution: "randomatic@npm:3.0.0"
@@ -28730,7 +28515,7 @@ __metadata:
languageName: node
linkType: hard
-"react-is@npm:^16.10.2, react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0, react-is@npm:^16.8.0, react-is@npm:^16.8.6, react-is@npm:^16.9.0":
+"react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0, react-is@npm:^16.8.0, react-is@npm:^16.9.0":
version: 16.13.1
resolution: "react-is@npm:16.13.1"
checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f
@@ -28919,20 +28704,6 @@ __metadata:
languageName: node
linkType: hard
-"react-test-renderer@npm:^16.0.0-0":
- version: 16.12.0
- resolution: "react-test-renderer@npm:16.12.0"
- dependencies:
- object-assign: ^4.1.1
- prop-types: ^15.6.2
- react-is: ^16.8.6
- scheduler: ^0.18.0
- peerDependencies:
- react: ^16.0.0
- checksum: c4be5f7340e8b8423931384b6916294715b327e288749610f3199a443b77a834602c9f70d934cc6e74d5563f723221e8ccd90fb0ebec19a4bcc205805352dbe4
- languageName: node
- linkType: hard
-
"react-tippy@npm:^1.2.2":
version: 1.2.2
resolution: "react-tippy@npm:1.2.2"
@@ -29294,13 +29065,6 @@ __metadata:
languageName: node
linkType: hard
-"reflect.ownkeys@npm:^0.2.0":
- version: 0.2.0
- resolution: "reflect.ownkeys@npm:0.2.0"
- checksum: 9530b166569e547c2cf25ade3cdc39c662212feeccf3e0ed46e6d8abf92f5683c82d7857011cee6230bf648eb0b99b6b419a007012b8571dcd4bb4d818d3b88d
- languageName: node
- linkType: hard
-
"regenerate-unicode-properties@npm:^10.1.0":
version: 10.1.0
resolution: "regenerate-unicode-properties@npm:10.1.0"
@@ -30269,16 +30033,6 @@ __metadata:
languageName: node
linkType: hard
-"rst-selector-parser@npm:^2.2.3":
- version: 2.2.3
- resolution: "rst-selector-parser@npm:2.2.3"
- dependencies:
- lodash.flattendeep: ^4.4.0
- nearley: ^2.7.10
- checksum: fbfb2f6a7d4c9b3e013ef555ac06e5dba444e0d37dc959b94c507b6c34093ef10fe98141338d9cac58e5ae0f9453a5ef7f85af3d5e6386b237c1b3552debe4a0
- languageName: node
- linkType: hard
-
"rsvp@npm:^4.8.4":
version: 4.8.5
resolution: "rsvp@npm:4.8.5"
@@ -33695,13 +33449,6 @@ __metadata:
languageName: node
linkType: hard
-"underscore@npm:~1.4.4":
- version: 1.4.4
- resolution: "underscore@npm:1.4.4"
- checksum: d9d731fe7ef51fbf8cf3d1b72659a9d0da51d655a67ed866ee33d563d7ce474df37086fa9f37a2fddf85750aee5b9bf5297e80bf41024eeb447fd5e11add83ba
- languageName: node
- linkType: hard
-
"undertaker-registry@npm:^1.0.0":
version: 1.0.1
resolution: "undertaker-registry@npm:1.0.1"