aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/shallow-with-context.js
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-12-05 00:32:08 +0800
committerGitHub <noreply@github.com>2018-12-05 00:32:08 +0800
commitd1996509deccd98d7ffa4cc360dc96c5392879d3 (patch)
treec8d9dbf1a3b393573f51af2563cdc3f589b1a162 /ui/lib/shallow-with-context.js
parent35670e926116b19e66931dace838d785adffac09 (diff)
parent8194309a9a7319bcebd6761a4596c208375adfab (diff)
downloadtangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.tar.gz
tangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.tar.zst
tangerine-wallet-browser-d1996509deccd98d7ffa4cc360dc96c5392879d3.zip
Merge pull request #5704 from MetaMask/new-gas-customize-feature-branch-d
Gas customization features
Diffstat (limited to 'ui/lib/shallow-with-context.js')
-rw-r--r--ui/lib/shallow-with-context.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/lib/shallow-with-context.js b/ui/lib/shallow-with-context.js
new file mode 100644
index 000000000..cf83dd76e
--- /dev/null
+++ b/ui/lib/shallow-with-context.js
@@ -0,0 +1,7 @@
+import { shallow } from 'enzyme'
+
+export default function (jsxComponent) {
+ return shallow(jsxComponent, {
+ context: { t: (str1, str2) => str2 ? str1 + str2 : str1 },
+ })
+}