aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorThomas <tmashuang@gmail.com>2018-01-31 05:26:37 +0800
committerThomas <tmashuang@gmail.com>2018-01-31 05:26:37 +0800
commitc2cef0f815efb5667bf9aabff125cc1a8822283c (patch)
treed2fa8be7f4b83cbad52bc0672296102046fb7972 /test/lib
parentb991ac0422acd509d5fd4a4ab28c2e6c4004c62f (diff)
downloadtangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar.gz
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar.bz2
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar.lz
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar.xz
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.tar.zst
tangerine-wallet-browser-c2cef0f815efb5667bf9aabff125cc1a8822283c.zip
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