Skip to content

Commit b0c167f

Browse files
committed
Fix autocleanup tests
1 parent 1e1b333 commit b0c167f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/vue-testing-library.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ function render(
2525
const baseElement = customBaseElement || customContainer || document.body
2626
const container = customContainer || baseElement.appendChild(div)
2727

28-
const attachTo = document.createElement('div')
29-
container.appendChild(attachTo)
30-
3128
// const localVue = createLocalVue()
3229
let vuexStore = null
3330
let router = null
@@ -66,13 +63,16 @@ function render(
6663
// localVue,
6764
// router,
6865
// store: vuexStore,
69-
attachTo,
66+
attachTo: container,
7067
...mountOptions,
7168
...additionalOptions,
7269
})
7370

7471
mountedWrappers.add(wrapper)
75-
container.appendChild(wrapper.element)
72+
73+
// hack to remove id="app"
74+
// this fixes tests in auto-cleanup.js and auto-cleanup-skip.js
75+
wrapper.parentElement.removeAttribute('id')
7676

7777
return {
7878
container,

0 commit comments

Comments
 (0)