diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-01-07 19:07:18 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-01-07 22:12:20 +0100 |
commit | 58f3a0382bfdec10cdfdc274f76429bf8acd4bfe (patch) | |
tree | bc6cb6118a4a24976254f304bc18f9015a6352ee /test/parallel/test-repl-harmony.js | |
parent | 8a83ebaede7591e7bd3745d0ca27ecde2531b100 (diff) | |
download | node-new-58f3a0382bfdec10cdfdc274f76429bf8acd4bfe.tar.gz |
test: fix parallel/test-repl-harmony with new v8
Assignment to a const var in strict mode is a lazy TypeError now.
Update the test accordingly.
PR-URL: https://github.com/iojs/io.js/pull/243
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/parallel/test-repl-harmony.js')
-rw-r--r-- | test/parallel/test-repl-harmony.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-repl-harmony.js b/test/parallel/test-repl-harmony.js index 701dd5ed67..b1bff563de 100644 --- a/test/parallel/test-repl-harmony.js +++ b/test/parallel/test-repl-harmony.js @@ -23,11 +23,11 @@ var common = require('../common'); var assert = require('assert'); var spawn = require('child_process').spawn; -var args = ['--harmony', '--use-strict', '-i']; +var args = ['--harmony', '--harmony_scoping', '--use-strict', '-i']; var child = spawn(process.execPath, args); -var input = 'function x(){const y=1;y=2}\n'; -var expectOut = /^> SyntaxError: Assignment to constant variable.\n/; +var input = '(function(){const y=1;y=2})()\n'; +var expectOut = /^> TypeError: Assignment to constant variable.\n/; child.stderr.setEncoding('utf8'); child.stderr.on('data', function(c) { |