From b7653e82079b60078b921776b169518d13c7e806 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 2 Nov 2017 14:58:41 -0230 Subject: Get current NewUI-flat tests working. --- test/lib/shallow-with-store.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/lib/shallow-with-store.js (limited to 'test/lib/shallow-with-store.js') diff --git a/test/lib/shallow-with-store.js b/test/lib/shallow-with-store.js new file mode 100644 index 000000000..411aa0455 --- /dev/null +++ b/test/lib/shallow-with-store.js @@ -0,0 +1,11 @@ +const shallow = require('enzyme').shallow + +module.exports = shallowWithStore + +function shallowWithStore (component, store) { + const context = { + store, + } + + return shallow(component, { context }) +}; -- cgit From cefe6cded6728ff95d951435430da311356c3b23 Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Sat, 25 Nov 2017 18:37:12 -0600 Subject: Update to Enzyme 3.2.0 --- test/lib/shallow-with-store.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'test/lib/shallow-with-store.js') diff --git a/test/lib/shallow-with-store.js b/test/lib/shallow-with-store.js index 411aa0455..2a66adb17 100644 --- a/test/lib/shallow-with-store.js +++ b/test/lib/shallow-with-store.js @@ -1,11 +1,16 @@ -const shallow = require('enzyme').shallow +const { shallow, mount } = require('enzyme') -module.exports = shallowWithStore - -function shallowWithStore (component, store) { +exports.shallowWithStore = function shallowWithStore (component, store) { const context = { store, } return shallow(component, { context }) -}; +} + +exports.mountWithStore = function mountWithStore (component, store) { + const context = { + store, + } + return mount(component, { context }) +} -- cgit