Merge pull request #8663 from pranayberry/fix/bracket-notation-testcase

Updated the test case for better flexibility.
This commit is contained in:
Logan Tegman
2016-05-17 09:03:28 -07:00

View File

@ -1352,7 +1352,7 @@
], ],
"tests": [ "tests": [
"assert(firstLetterOfLastName === 'L', 'message: The <code>firstLetterOfLastName</code> variable should have the value of <code>L</code>.');", "assert(firstLetterOfLastName === 'L', 'message: The <code>firstLetterOfLastName</code> variable should have the value of <code>L</code>.');",
"assert(code.match(/firstLetterOfLastName\\s*=\\s*lastName\\s*\\[\\s*\\d+\\s*\\]/), 'message: You should use bracket notation.');" "assert(code.match(/firstLetterOfLastName\\s*?=\\s*?lastName\\[.*?\\]/), 'message: You should use bracket notation.');"
], ],
"type": "waypoint", "type": "waypoint",
"challengeType": 1, "challengeType": 1,
@ -1442,7 +1442,7 @@
], ],
"tests": [ "tests": [
"assert(thirdLetterOfLastName === 'v', 'message: The <code>thirdLetterOfLastName</code> variable should have the value of <code>v</code>.');", "assert(thirdLetterOfLastName === 'v', 'message: The <code>thirdLetterOfLastName</code> variable should have the value of <code>v</code>.');",
"assert(code.match(/thirdLetterOfLastName\\s*=\\s*lastName\\s*\\[\\s*\\d+\\s*\\]/), 'message: You should use bracket notation.');" "assert(code.match(/thirdLetterOfLastName\\s*?=\\s*?lastName\\[.*?\\]/), 'message: You should use bracket notation.');"
], ],
"type": "waypoint", "type": "waypoint",
"challengeType": 1, "challengeType": 1,