aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2018-02-01 06:18:47 +0800
committerGitHub <noreply@github.com>2018-02-01 06:18:47 +0800
commit1a93b1ade292369bff2ceecf036f856fe0b20dbb (patch)
tree2fedac9028936ba3b371873a10283b4bb5ed8e41 /test/lib
parent1eec2ca8c0e42fdf603f4f6b19c75f61ecbc8fc3 (diff)
parent1f8dd5f0def9856efa867c74dba71dba47433a46 (diff)
downloadtangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar.gz
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar.bz2
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar.lz
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar.xz
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.tar.zst
tangerine-wallet-browser-1a93b1ade292369bff2ceecf036f856fe0b20dbb.zip
Merge pull request #3146 from MetaMask/i3082-AddTokenValidateInputs
Set address to default with empty string, add test validation.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/shallow-with-store.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lib/shallow-with-store.js b/test/lib/shallow-with-store.js
new file mode 100644
index 000000000..10c02a18c
--- /dev/null
+++ b/test/lib/shallow-with-store.js
@@ -0,0 +1,20 @@
+const { shallow, mount } = require('enzyme')
+
+module.exports = {
+ shallowWithStore,
+ mountWithStore,
+}
+
+function shallowWithStore (component, store) {
+ const context = {
+ store,
+ }
+ return shallow(component, {context})
+}
+
+function mountWithStore (component, store) {
+ const context = {
+ store,
+ }
+ return mount(component, {context})
+} \ No newline at end of file