From 666fe596bf4629777f995dd79046b1db632ffdfb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 30 Jul 2021 09:28:51 +0300 Subject: Enable `unicorn/no-array-for-each` rule --- js/tests/unit/util/backdrop.spec.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/tests/unit/util') diff --git a/js/tests/unit/util/backdrop.spec.js b/js/tests/unit/util/backdrop.spec.js index b885b60b5..818ddf221 100644 --- a/js/tests/unit/util/backdrop.spec.js +++ b/js/tests/unit/util/backdrop.spec.js @@ -17,9 +17,9 @@ describe('Backdrop', () => { clearFixture() const list = document.querySelectorAll(CLASS_BACKDROP) - list.forEach(el => { + for (const el of list) { el.remove() - }) + } }) describe('show', () => { @@ -35,9 +35,10 @@ describe('Backdrop', () => { instance.show() instance.show(() => { expect(getElements().length).toEqual(1) - getElements().forEach(el => { + for (const el of getElements()) { expect(el.classList.contains(CLASS_NAME_SHOW)).toEqual(true) - }) + } + done() }) }) @@ -67,9 +68,10 @@ describe('Backdrop', () => { instance.show(() => { expect(getElements().length).toEqual(1) - getElements().forEach(el => { + for (const el of getElements()) { expect(el.classList.contains(CLASS_NAME_FADE)).toEqual(true) - }) + } + done() }) }) -- cgit v1.2.3