replace a test with correct code and change 'function' to 'selector' in description (#14578)

pull/15574/head
Jools 2017-06-27 14:33:37 +02:00 committed by Eric Leung
parent 35a6cebeb5
commit aa3800c902
1 changed files with 2 additions and 2 deletions

View File

@ -1328,8 +1328,8 @@
"tests": [
"assert($(\".target:nth-child(2)\").hasClass(\"animated\") && $(\".target:nth-child(2)\").hasClass(\"bounce\"), 'message: The second element in your <code>target</code> elements should bounce.');",
"assert($(\".animated.bounce\").length === 2, 'message: Only two elements should bounce.');",
"assert(code.match(/\\:nth-child\\(/g), 'message: You should use the <code>&#58;nth-child&#40&#41</code> function to modify these elements.');",
"assert(code.match(/<button class=\"btn btn-default target\" id=\"target2\">/g), 'message: Only use jQuery to add these classes to the element.');"
"assert(code.match(/\\:nth-child\\(/g), 'message: You should use the <code>&#58;nth-child&#40&#41</code> selector to modify these elements.');",
"assert(code.match(/\\$\\(\".target:nth-child\\(2\\)\"\\)/g) || code.match(/\\$\\('.target:nth-child\\(2\\)'\\)/g) || code.match(/\\$\\(\".target\"\\).filter\\(\":nth-child\\(2\\)\"\\)/g) || code.match(/\\$\\('.target'\\).filter\\(':nth-child\\(2\\)'\\)/g), 'message: Only use jQuery to add these classes to the element.');"
],
"type": "waypoint",
"challengeType": 0,