From 9c394e7e80d0c4ca5919948f3f26309d0eba6b38 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Mon, 8 May 2023 00:36:33 +0000 Subject: [PATCH] fixed test to accept both background and background-color --- exercises/05-Specificity/tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js index a09aa84a..2323ce24 100644 --- a/exercises/05-Specificity/tests.js +++ b/exercises/05-Specificity/tests.js @@ -43,8 +43,8 @@ describe("All the styles should be applied", function () { let cssArray = document.styleSheets[0].cssRules; let orangeHoverSelector = ""; for (let i = 0; i < cssArray.length; i++) { - if (cssArray[i].selectorText === "#thirditem" && cssArray[i].style._importants.background === "important") { - orangeHoverSelector = cssArray[i].style.background; + if (cssArray[i].selectorText === "#thirditem" && cssArray[i].style._importants.background === "important" || cssArray[i].style._importants["background-color"] === "important") { + orangeHoverSelector = cssArray[i].style.background || cssArray[i].style["background-color"]; } }