1- import { createLocalVue , mount } from '@vue/test-utils'
1+ import {
2+ createLocalVue ,
3+ mount
4+ } from '@vue/test-utils'
25import Simulate from './Simulate'
3- import { getQueriesForElement , prettyDOM , wait } from 'dom-testing-library'
6+ import {
7+ getQueriesForElement ,
8+ prettyDOM ,
9+ wait
10+ } from 'dom-testing-library'
411
512const mountedWrappers = new Set ( )
613
7- function render ( TestComponent , { props = null , store = null , routes = null } = { } , configurationCb ) {
14+ function render ( TestComponent , {
15+ props = null ,
16+ store = null ,
17+ routes = null
18+ } = { } , configurationCb ) {
819 const localVue = createLocalVue ( )
920 let vuexStore = null
1021 let router = null
@@ -18,7 +29,9 @@ function render (TestComponent, { props = null, store = null, routes = null } =
1829 if ( routes ) {
1930 const VueRouter = require ( 'vue-router' )
2031 localVue . use ( VueRouter )
21- router = new VueRouter ( routes )
32+ router = new VueRouter ( {
33+ routes
34+ } )
2235 }
2336
2437 if ( configurationCb && typeof configurationCb === 'function' ) {
@@ -29,7 +42,8 @@ function render (TestComponent, { props = null, store = null, routes = null } =
2942 localVue,
3043 router,
3144 store : vuexStore ,
32- propsData : { ...props } ,
45+ propsData : { ...props
46+ } ,
3347 attachToDocument : true ,
3448 sync : false
3549 } )
@@ -61,4 +75,8 @@ function cleanupAtWrapper (wrapper) {
6175}
6276
6377export * from 'dom-testing-library'
64- export { cleanup , render , Simulate }
78+ export {
79+ cleanup ,
80+ render ,
81+ Simulate
82+ }
0 commit comments