1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 00:54:04 +02:00

Js: fix some tests

This commit is contained in:
GeoSot
2021-04-12 02:57:53 +03:00
committed by Mark Otto
parent 2120a02b3c
commit 0d440b0e14
3 changed files with 23 additions and 13 deletions

View File

@@ -14,6 +14,15 @@ describe('Offcanvas', () => {
afterEach(() => {
clearFixture()
document.body.classList.remove('offcanvas-open')
document.documentElement.removeAttribute('style')
document.body.removeAttribute('style')
document.body.removeAttribute('data-bs-padding-right')
})
beforeEach(() => {
document.documentElement.removeAttribute('style')
document.body.removeAttribute('style')
document.body.removeAttribute('data-bs-padding-right')
})
describe('VERSION', () => {
@@ -177,7 +186,7 @@ describe('Offcanvas', () => {
offCanvas.hide()
})
offCanvasEl.addEventListener('hidden.bs.offcanvas', () => {
expect(document.body.style.overflow).toEqual('auto')
expect(document.body.style.overflow).not.toEqual('hidden')
done()
})
offCanvas.show()