diff options
| author | GeoSot <[email protected]> | 2021-05-11 11:06:32 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-11 11:06:32 +0300 |
| commit | 8d1b0fb779e8eb07bab2059167741a0b4ecf4a14 (patch) | |
| tree | 0007fe733531baa1c3e8cd5cb83b5bedc5531fb1 | |
| parent | 19f95a3d8d3c906029c4877135f2f856c2a22076 (diff) | |
| download | bootstrap-8d1b0fb779e8eb07bab2059167741a0b4ecf4a14.tar.xz bootstrap-8d1b0fb779e8eb07bab2059167741a0b4ecf4a14.zip | |
Fix offcanvas test to expect the initial body `overflow` value (#33927)
Co-authored-by: XhmikosR <[email protected]>
| -rw-r--r-- | js/tests/unit/offcanvas.spec.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tests/unit/offcanvas.spec.js b/js/tests/unit/offcanvas.spec.js index 64c565318..dfb6c429e 100644 --- a/js/tests/unit/offcanvas.spec.js +++ b/js/tests/unit/offcanvas.spec.js @@ -180,6 +180,7 @@ describe('Offcanvas', () => { const offCanvasEl = fixtureEl.querySelector('.offcanvas') const offCanvas = new Offcanvas(offCanvasEl, { scroll: false }) + const initialOverFlow = document.body.style.overflow offCanvasEl.addEventListener('shown.bs.offcanvas', () => { expect(document.body.style.overflow).toEqual('hidden') @@ -187,7 +188,7 @@ describe('Offcanvas', () => { offCanvas.hide() }) offCanvasEl.addEventListener('hidden.bs.offcanvas', () => { - expect(document.body.style.overflow).not.toEqual('hidden') + expect(document.body.style.overflow).toEqual(initialOverFlow) done() }) offCanvas.show() |
