fix(curriculum): regex to target html elements using jQuery to captur… (#38649)

* fix(curriculum): regex to target html elements using jQuery to capture white spaces

* replace whitespace before test

* fix linting issue with single quotes

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
This commit is contained in:
Ashraf Nazar
2020-09-01 02:24:43 +01:00
committed by GitHub
parent a294021d53
commit 70f1ebd2fc

View File

@ -33,8 +33,7 @@ tests:
- text: You should only use jQuery to add these classes to the element. - text: You should only use jQuery to add these classes to the element.
testString: 'assert(!code.match(/class.*animated/g));' testString: 'assert(!code.match(/class.*animated/g));'
- text: Your jQuery code should be within the <code>$(document).ready();</code> function. - text: Your jQuery code should be within the <code>$(document).ready();</code> function.
testString: assert(code.match(/\$\(document\)\.ready\(function.*(\s|\n)*.*button.*.addClass.*\);/g)); testString: 'assert(code.replace(/\s/g, '''').match(/\$\(document\)\.ready\(function\(\)\{\$/g));'
``` ```
</section> </section>