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:
parent
a294021d53
commit
70f1ebd2fc
@ -33,8 +33,7 @@ tests:
|
||||
- text: You should only use jQuery to add these classes to the element.
|
||||
testString: 'assert(!code.match(/class.*animated/g));'
|
||||
- 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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user