Skip to content

Commit

Permalink
test: fix tests after V8 upgrade
Browse files Browse the repository at this point in the history
- An error message changed for undefined references
- `let` is now allowed in sloppy mode
- ES2015 proxies are shipped and the `Proxy` global is now a function

PR-URL: #4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information
targos authored and Ali Sheikh committed Mar 4, 2016
1 parent 079973b commit 9968941
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/message/timeout_throw.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
undefined_reference_error_maker;
^
ReferenceError: undefined_reference_error_maker is not defined
at null._onTimeout (*test*message*timeout_throw.js:*:*)
at ._onTimeout (*test*message*timeout_throw.js:*:*)
at tryOnTimeout (timers.js:*:*)
at Timer.listOnTimeout (timers.js:*:*)
3 changes: 1 addition & 2 deletions test/parallel/test-repl-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ function testSloppyMode() {
cli.input.emit('data', `
let y = 3
`.trim() + '\n');
assert.ok(/SyntaxError: Block-scoped/.test(
cli.output.accumulator.join('')));
assert.equal(cli.output.accumulator.join(''), 'undefined\n> ');
}

function testStrictMode() {
Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-repl-tab-complete.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

// Flags: --harmony-proxies

var common = require('../common');
var assert = require('assert');
var repl = require('repl');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
// Flags: --harmony_proxies

require('../common');
var assert = require('assert');
Expand All @@ -9,11 +8,11 @@ var vm = require('vm');
// context. Make sure that the new context has a Proxy object of its own.
var sandbox = {};
vm.runInNewContext('this.Proxy = Proxy', sandbox);
assert(typeof sandbox.Proxy === 'object');
assert(typeof sandbox.Proxy === 'function');
assert(sandbox.Proxy !== Proxy);

// Unless we copy the Proxy object explicitly, of course.
sandbox = { Proxy: Proxy };
vm.runInNewContext('this.Proxy = Proxy', sandbox);
assert(typeof sandbox.Proxy === 'object');
assert(typeof sandbox.Proxy === 'function');
assert(sandbox.Proxy === Proxy);

0 comments on commit 9968941

Please sign in to comment.