diff options
Diffstat (limited to 'js/tests/helpers/fixture.js')
| -rw-r--r-- | js/tests/helpers/fixture.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/tests/helpers/fixture.js b/js/tests/helpers/fixture.js index 0bfc26f46..3d6f395e8 100644 --- a/js/tests/helpers/fixture.js +++ b/js/tests/helpers/fixture.js @@ -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) + }) +} |
