aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/offcanvas.spec.js
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2021-04-12 02:57:53 +0300
committerMark Otto <[email protected]>2021-04-14 13:25:44 -0700
commit0d440b0e1457887349f8b9a9fb463d5b996ac405 (patch)
tree567a9ba33d1cd07c5006ffb8f4c7829d1fd83cde /js/tests/unit/offcanvas.spec.js
parent2120a02b3c84bce7ad0a3aea4147eabc3e9313c9 (diff)
downloadbootstrap-0d440b0e1457887349f8b9a9fb463d5b996ac405.tar.xz
bootstrap-0d440b0e1457887349f8b9a9fb463d5b996ac405.zip
Js: fix some tests
Diffstat (limited to 'js/tests/unit/offcanvas.spec.js')
-rw-r--r--js/tests/unit/offcanvas.spec.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/js/tests/unit/offcanvas.spec.js b/js/tests/unit/offcanvas.spec.js
index 0122d4dff..0a921bc9f 100644
--- a/js/tests/unit/offcanvas.spec.js
+++ b/js/tests/unit/offcanvas.spec.js
@@ -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()