Skip to content

Commit

Permalink
Merge pull request #48 from brennj/master
Browse files Browse the repository at this point in the history
Return object from callback.
  • Loading branch information
dfcook authored Jun 28, 2019
2 parents f7bb066 + 760b23a commit b04a1ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vue-testing-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function render(
const localVue = createLocalVue()
let vuexStore = null
let router = null
let additionalOptions = {}

if (store) {
const Vuex = require('vuex')
Expand All @@ -33,7 +34,7 @@ function render(
}

if (configurationCb && typeof configurationCb === 'function') {
configurationCb(localVue, vuexStore, router)
additionalOptions = configurationCb(localVue, vuexStore, router)
}

if (!mountOptions.propsData && !!mountOptions.props) {
Expand All @@ -47,7 +48,8 @@ function render(
store: vuexStore,
attachToDocument: true,
sync: false,
...mountOptions
...mountOptions,
...additionalOptions
})

mountedWrappers.add(wrapper)
Expand Down

0 comments on commit b04a1ff

Please sign in to comment.