fix(test): make less strict about whitespace (#36705)

This commit is contained in:
Tom
2019-08-28 03:48:57 -05:00
committed by Oliver Eyton-Williams
parent a03602a1d4
commit 46d67deb46

View File

@ -35,7 +35,7 @@ For the cat with the "id" of 2, print to the console the second value in the <co
```yml
tests:
- text: Your code should use bracket and dot notation to access the proper code name, and print "Loki" to the console.
testString: assert(code.match(/(?:json\[2\]\.codeNames\[1\]|json\[2\]\[('|")codeNames\1\]\[1\])/g));
testString: assert(code.match(/console\s*\.\s*log\s*\(\s*json\s*\[2\]\s*(\.\s*codeNames|\[\s*('|`|")codeNames\2\s*\])\s*\[\s*1\s*\]\s*\)/g));
```