Skip to content

Commit

Permalink
test: fix parallel/test-repl with new v8
Browse files Browse the repository at this point in the history
Per the ES6 spec, V8 3.31 no longer throws a SyntaxError for scoped
function declarations.

PR-URL: #243
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis committed Jan 7, 2015
1 parent 58f3a03 commit 6e9d1c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function error_test() {
expect: /^SyntaxError: Delete of an unqualified identifier in strict mode/ },
{ client: client_unix, send: '(function() { "use strict"; eval = 17; })()',
expect: /^SyntaxError: Unexpected eval or arguments in strict mode/ },
{ client: client_unix, send: '(function() { "use strict"; if (true){ function f() { } } })()',
{ client: client_unix, send: '(function() { "use strict"; if (true) function f() { } })()',
expect: /^SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function/ },
// Named functions can be used:
{ client: client_unix, send: 'function blah() { return 1; }',
Expand Down

0 comments on commit 6e9d1c8

Please sign in to comment.