Merge pull request #11843 from robbawebba/fix/jquery-challenge-test-coverage
Expand the test coverage of jQuery challenge
This commit is contained in:
@ -930,8 +930,8 @@
|
|||||||
"</div>"
|
"</div>"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert($(\"#target4\").length === 0, 'message: Use jQuery to remove your <code>target4</code> element from your page.');",
|
"assert($(\"#target4\").length === 0 && code.match(/\\$\\([\"']#target4[\"']\\).remove\\(\\)/g), 'message: Use jQuery to remove your <code>target4</code> element from your page.');",
|
||||||
"assert(code.match(/id=\"target4/g), 'message: Only use jQuery to remove this element.');"
|
"assert(code.match(/id=\"target4/g) && !code.match(/<!--.*id=\"target4\".*-->/g) && $(\"#right-well\").length > 0, 'message: Only use jQuery to remove this element.');"
|
||||||
],
|
],
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
"challengeType": 0,
|
"challengeType": 0,
|
||||||
|
Reference in New Issue
Block a user