Skip to content

Commit

Permalink
test: fix parallel/test-repl-harmony with new v8
Browse files Browse the repository at this point in the history
Assignment to a const var in strict mode is a lazy TypeError now.
Update the test accordingly.

PR-URL: #243
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 8a83eba commit 58f3a03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-repl-harmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 58f3a03

Please sign in to comment.