Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit b22a986

Browse files
committed
fix(offcanvas.spec): fix to property test.
1 parent 45969c8 commit b22a986

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/bootstrap-vue-next/src/components/BOffcanvas/offcanvas.spec.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ describe.skip('offcanvas', () => {
1515
})
1616

1717
afterEach(() => {
18-
document.body.outerHTML = ''
18+
const el = document.getElementById('body-teleports')
19+
if (el) document.body.removeChild(el)
1920
})
2021

2122
it('has body teleports element set by to property', () => {
@@ -24,11 +25,9 @@ describe.skip('offcanvas', () => {
2425
to: '#body-teleports',
2526
modelValue: true,
2627
},
27-
global: {stubs: {teleport: true}},
2828
})
29-
const div = wrapper.find('#body-teleports')
30-
const offcanvas = div.find('.offcanvas')
31-
expect(offcanvas.exists()).toBe(true)
29+
expect(wrapper.exists()).toBe(true)
30+
expect(document.getElementById('body-teleports')?.querySelector('.offcanvas')).not.toBe(null)
3231
})
3332

3433
it('has static class offcanvas', () => {

0 commit comments

Comments
 (0)