From 731efaaaae1a22479b413b4bea2e84eb1fedb66a Mon Sep 17 00:00:00 2001 From: Eduardo Azeredo Massarani Date: Wed, 14 Feb 2018 09:21:14 -0200 Subject: [PATCH] update test for media query challenge (#16691) the test fails if there is no space between @media and the parenthesis, even though it is possible to not have a space. Also it doesn't tell you that that is the problem, so it can make the person get stuck trying to figure out what they did wrong, when in fact they were right, like I was for half an hour until I came here to check the test =) --- challenges/01-responsive-web-design/responsive-web-design.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/01-responsive-web-design/responsive-web-design.json b/challenges/01-responsive-web-design/responsive-web-design.json index c1a7950c31..36b5bd62a0 100644 --- a/challenges/01-responsive-web-design/responsive-web-design.json +++ b/challenges/01-responsive-web-design/responsive-web-design.json @@ -100,7 +100,7 @@ ], "tests": [ "assert($('p').css('font-size') == '10px', 'message: Your p element should have the font-size of 10px when the device height is less than or equal to 800px.');", - "assert(code.match(/@media \\(max-height:\\s*?800px\\)/g), 'message: Declare a @media query for devices with a height less than or equal to 800px.');" + "assert(code.match(/@media\\s?\\(max-height:\\s*?800px\\)/g), 'message: Declare a @media query for devices with a height less than or equal to 800px.');" ], "type": "waypoint", "releasedOn": "Feb 17, 2017",