blob: 9d37cdd5f6123fd10af8b8602e512d5a1647aa35 [file] [log] [blame]
description(
"This test checks that the Function constructor detects some syntax errors correctly (bug#59795)."
);
shouldThrow("Function('(i + (j)')", "\"SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression.\"");
shouldThrow("Function('return (i + (j)')", "\"SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression.\"");