Fix/tests whitespace strictness (#36706)

* fix(tests): make less strict about white space
This commit is contained in:
Tom
2019-08-28 03:53:17 -05:00
committed by Oliver Eyton-Williams
parent 46d67deb46
commit 428ab97650
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ tests:
- text: Your code should have an <code>onload</code> event handler set to a function.
testString: assert(code.match(/\.onload\s*=\s*(function|\(\s*?\))\s*?(\(\s*?\)|\=\>)\s*?{/g));
- text: Your code should use the <code>JSON.parse</code> method to parse the <code>responseText</code>.
testString: assert(code.match(/JSON\s*\.parse\(.*\.responseText\)/g));
testString: assert(code.match(/JSON\s*\.parse\(\s*.*\.responseText\s*\)/g));
- text: Your code should get the element with class <code>message</code> and change its inner HTML to the string of JSON data.
testString: assert(code.match(/document\s*\.getElementsByClassName\(\s*?('|")message\1\s*?\)\[0\]\s*\.innerHTML\s*?=\s*?JSON\.stringify\(.+?\)/g));