aboutsummaryrefslogtreecommitdiff
path: root/js/tests/helpers
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-07-30 09:28:51 +0300
committerXhmikosR <[email protected]>2021-10-05 19:52:11 +0300
commit666fe596bf4629777f995dd79046b1db632ffdfb (patch)
tree9e14fcf9c5d325e668d75d2b313242e16e7fbec3 /js/tests/helpers
parent2b4d0d166b58cabfb0384a2081d84e51df84e37f (diff)
downloadbootstrap-666fe596bf4629777f995dd79046b1db632ffdfb.tar.xz
bootstrap-666fe596bf4629777f995dd79046b1db632ffdfb.zip
Enable `unicorn/no-array-for-each` rule
Diffstat (limited to 'js/tests/helpers')
-rw-r--r--js/tests/helpers/fixture.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/helpers/fixture.js b/js/tests/helpers/fixture.js
index 29fa91896..02915af44 100644
--- a/js/tests/helpers/fixture.js
+++ b/js/tests/helpers/fixture.js
@@ -34,17 +34,17 @@ export const jQueryMock = {
elements: undefined,
fn: {},
each(fn) {
- this.elements.forEach(el => {
+ for (const el of this.elements) {
fn.call(el)
- })
+ }
}
}
export const clearBodyAndDocument = () => {
const attributes = ['data-bs-padding-right', 'style']
- attributes.forEach(attr => {
+ for (const attr of attributes) {
document.documentElement.removeAttribute(attr)
document.body.removeAttribute(attr)
- })
+ }
}