diff options
| author | XhmikosR <[email protected]> | 2021-08-18 07:29:56 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-18 07:29:56 +0300 |
| commit | 433a148c9e61aa942801fd8101dfa5c4045fdaed (patch) | |
| tree | f41db59fd06019169df5ea0338213ec0e298f226 /js/tests/helpers/fixture.js | |
| parent | b97cfa163b5098db70e03b27c91fca5dde9c267e (diff) | |
| parent | 18b3e1ac71f73d006756684a285c5a818e2d1454 (diff) | |
| download | bootstrap-global-focus-vars.tar.xz bootstrap-global-focus-vars.zip | |
Merge branch 'main' into global-focus-varsglobal-focus-vars
Diffstat (limited to 'js/tests/helpers/fixture.js')
| -rw-r--r-- | js/tests/helpers/fixture.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/js/tests/helpers/fixture.js b/js/tests/helpers/fixture.js index 0bfc26f46..2ce1081fc 100644 --- a/js/tests/helpers/fixture.js +++ b/js/tests/helpers/fixture.js @@ -11,7 +11,7 @@ export const getFixture = () => { fixtureEl.style.left = '-10000px' fixtureEl.style.width = '10000px' fixtureEl.style.height = '10000px' - document.body.appendChild(fixtureEl) + document.body.append(fixtureEl) } return fixtureEl @@ -39,3 +39,12 @@ export const jQueryMock = { }) } } + +export const clearBodyAndDocument = () => { + const attributes = ['data-bs-padding-right', 'style'] + + attributes.forEach(attr => { + document.documentElement.removeAttribute(attr) + document.body.removeAttribute(attr) + }) +} |
