From 760b23a5be1915d477535510e77e14950093c79d Mon Sep 17 00:00:00 2001 From: John Brennan Date: Tue, 25 Jun 2019 13:21:32 +0100 Subject: [PATCH] return object from callback --- src/vue-testing-library.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vue-testing-library.js b/src/vue-testing-library.js index 4699d8c5..8250894f 100644 --- a/src/vue-testing-library.js +++ b/src/vue-testing-library.js @@ -17,6 +17,7 @@ function render( const localVue = createLocalVue() let vuexStore = null let router = null + let additionalOptions = {} if (store) { const Vuex = require('vuex') @@ -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) { @@ -47,7 +48,8 @@ function render( store: vuexStore, attachToDocument: true, sync: false, - ...mountOptions + ...mountOptions, + ...additionalOptions }) mountedWrappers.add(wrapper)