aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/shallow-with-store.js
blob: 10c02a18cc879e40997c38d9fd2098079c092d4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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})
}