From 45b573b57cc2e6dca54531861eabe5871a9c4159 Mon Sep 17 00:00:00 2001 From: Josh Alling Date: Fri, 20 Jul 2018 07:22:26 -0600 Subject: [PATCH] fix(challenges): allow for omitted unit after zero values ISSUES CLOSED: #166 --- .../01-responsive-web-design/applied-visual-design.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/01-responsive-web-design/applied-visual-design.json b/challenges/01-responsive-web-design/applied-visual-design.json index 43b171d39..123724e7e 100644 --- a/challenges/01-responsive-web-design/applied-visual-design.json +++ b/challenges/01-responsive-web-design/applied-visual-design.json @@ -2237,7 +2237,7 @@ { "text": "The color stop at 0 pixels should be yellow.", "testString": - "assert(code.match(/yellow\\s+?0px/gi), 'The color stop at 0 pixels should be yellow.');" + "assert(code.match(/yellow\\s+?0(px)?/gi), 'The color stop at 0 pixels should be yellow.');" }, { "text": "One color stop at 40 pixels should be yellow.", @@ -2925,7 +2925,7 @@ "text": "The @keyframes rule for 0% should use the left offset of 0px.", "testString": - "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0px;\\s*?left:\\s*?0px;\\s*?}/gi), 'The @keyframes rule for 0% should use the left offset of 0px.');" + "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0(px)?;\\s*?left:\\s*?0(px)?;\\s*?}/gi), 'The @keyframes rule for 0% should use the left offset of 0px.');" }, { "text": @@ -2937,7 +2937,7 @@ "text": "The @keyframes rule for 100% should use the left offset of -25px.", "testString": - "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0px;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The @keyframes rule for 100% should use the left offset of -25px.');" + "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0(px)?;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The @keyframes rule for 100% should use the left offset of -25px.');" } ], "solutions": [],