combine backslash tests for quoting strings challenge
parent
eba29a7cd5
commit
b4cc451111
|
@ -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>'</code> and four double quotes <code>"</code>');",
|
"assert(code.match(/\"/g).length === 4 && code.match(/'/g).length === 2, 'message: You should have two single quotes <code>'</code> and four double quotes <code>"</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,
|
||||||
|
|
Loading…
Reference in New Issue