Skip to content

Commit

Permalink
Merge pull request freeCodeCamp#4239 from ptsurbeleu/fix-anchor-assert
Browse files Browse the repository at this point in the history
Fix count a element assertion in 'waypoint-nest-an-anchor-element-within-a-paragraph' to avoid 'undefined is not an object' error
  • Loading branch information
ltegman committed Nov 9, 2015
2 parents df7f1df + f473d61 commit 3426405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seed/challenges/html5-and-css.json
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@
"Now nest your existing <code>a</code> element within a new <code>p</code> element so that the surrounding paragraph says \"View more cat photos\", but where only \"cat photos\" is a link, and the rest of the text is plain text."
],
"tests": [
"assert($(\"a\").attr(\"href\").match(/freecatphotoapp.com/gi).length > 0, 'You need an <code>a</code> element that links to \"freecatphotoapp.com\".')",
"assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").length > 0, 'You need an <code>a</code> element that links to \"http://www.freecatphotoapp.com\".')",
"assert($(\"a\").text().match(/cat\\sphotos/gi), 'Your <code>a</code> element should have the anchor text of \"cat photos\"')",
"assert($(\"p\") && $(\"p\").length > 2, 'Create a new <code>p</code> element around your <code>a</code> element.')",
"assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().is(\"p\"), 'Your <code>a</code> element should be nested within your new <code>p</code> element.')",
Expand Down

0 comments on commit 3426405

Please sign in to comment.