Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow space on function argument to pass test case #10464

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -194,7 +194,7 @@
"assert(code.match(/\\s*?\\}\\s*?\\)\\s*?\\;/g), 'message: You should have at least one closing set of brackets and parenthesis.');",
"assert(code.match(/\\s*?\\}\\s*?\\)\\s*?\\;/g) && code.match(/\\,\\s*?function\\s*?\\(\\s*?[A-Za-z_\\$]?\\w*?\\s*?\\)\\s*?\\{/g) && code.match(/\\s*?\\}\\s*?\\)\\s*?\\;/g).length === code.match(/\\s*?function\\s*?\\(\\s*?[A-Za-z_\\$]?\\w*?\\s*?\\)\\s*?\\{/g).length, 'message: Each callback function should have a closing set of brackets and parenthesis.');",
"assert(code.match(/\\$\\s*?\\.\\s*?getJSON\\s*?\\(\\s*?(\\\"|\\')\\/json\\/cats\\.json(\\\"|\\')\\s*?\\,\\s*?function\\s*?\\(\\s*?[A-Za-z_\\$]\\w*\\s*?\\)\\s*?\\{/g), 'message: You should be making use of the <code>getJSON</code> method given in the description to load data from the JSON file.');",
"assert(code.match(/\\$\\s*?\\.\\s*?getJSON\\s*?\\(\\s*?(\\\"|\\')\\/json\\/cats\\.json(\\\"|\\')\\s*?\\,\\s*?function\\s*?\\(\\s*?([A-Za-z_\\$]\\w*)\\s*?\\)\\s*?{/g) && /\\$\\s*?\\.\\s*?getJSON\\s*?\\(\\s*?(\\\"|\\')\\/json\\/cats\\.json(\\\"|\\')\\s*?,\\s*?function\\s*?\\(([A-Za-z_\\$]\\w*)\\s*?\\)/g.exec(code)[3] === /\\$\\(\\s*?(\\\"|\\')\\.message\\s*?(\\\"|\\')\\s*?\\)\\s*?\\.html\\s*?\\(\\s*?JSON\\s*?\\.\\s*?stringify\\s*?\\(\\s*?([A-Za-z_\\$]\\w*)\\s*?\\)\\s*?\\)/g.exec(code)[3], 'message: Don&apos;t forget to make the <code>.html</code> change the contents of the message box so that it contains the result of the <code>getJSON</code>.');"
"assert(code.match(/\\$\\s*?\\.\\s*?getJSON\\s*?\\(\\s*?(\\\"|\\')\\/json\\/cats\\.json(\\\"|\\')\\s*?\\,\\s*?function\\s*?\\(\\s*?([A-Za-z_\\$]\\w*)\\s*?\\)\\s*?{/g) && /\\$\\s*?\\.\\s*?getJSON\\s*?\\(\\s*?(\\\"|\\')\\/json\\/cats\\.json(\\\"|\\')\\s*?,\\s*?function\\s*?\\(\\s*?([A-Za-z_\\$]\\w*)\\s*?\\)/g.exec(code)[3] === /\\$\\(\\s*?(\\\"|\\')\\.message\\s*?(\\\"|\\')\\s*?\\)\\s*?\\.html\\s*?\\(\\s*?JSON\\s*?\\.\\s*?stringify\\s*?\\(\\s*?([A-Za-z_\\$]\\w*)\\s*?\\)\\s*?\\)/g.exec(code)[3], 'message: Don&apos;t forget to make the <code>.html</code> change the contents of the message box so that it contains the result of the <code>getJSON</code>.');"
],
"type": "waypoint",
"challengeType": 0,
Expand Down