combine backslash tests for quoting strings challenge

pull/10353/head
dhcodes 2016-08-26 10:10:27 -05:00
parent eba29a7cd5
commit b4cc451111
1 changed files with 2 additions and 3 deletions

View File

@ -1137,9 +1137,8 @@
"var myStr = '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>';" "var myStr = '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>';"
], ],
"tests": [ "tests": [
"assert(!/\\\\/g.test(code), 'message: Remove all the <code>backslashes</code> (<code>\\</code>)');", "assert(!/\\\\/g.test(code) && myStr === '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>', 'message: Remove all the <code>backslashes</code> (<code>\\</code>)');",
"assert(code.match(/\"/g).length === 4 && code.match(/'/g).length === 2, 'message: You should have two single quotes <code>&#39;</code> and four double quotes <code>&quot;</code>');", "assert(code.match(/\"/g).length === 4 && code.match(/'/g).length === 2, 'message: You should have two single quotes <code>&#39;</code> and four double quotes <code>&quot;</code>');"
"assert(myStr === '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>', 'message: Only remove the backslashes <code>\\</code> used to escape quotes.');"
], ],
"type": "waypoint", "type": "waypoint",
"challengeType": 1, "challengeType": 1,