Skip to content

Commit

Permalink
test: fix tests after V8 upgrade
Browse files Browse the repository at this point in the history
* Changes to messages.
* V8 enabled proxy support by default. The --harmony_proxies flag is
  now gone.

PR-URL: nodejs#6482
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
ofrobots committed May 5, 2016
1 parent c5a157c commit a784d6f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-fork-exec-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (process.argv[2] === 'fork') {
} else if (process.argv[2] === 'child') {
fork(__filename, ['fork']);
} else {
var execArgv = ['--harmony_proxies', '--stack-size=256'];
var execArgv = ['--stack-size=256'];
var args = [__filename, 'child', 'arg0'];

var child = spawn(process.execPath, execArgv.concat(args));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ assert.equal('foo bar\n', strings.shift());
assert.equal('foo bar hop\n', strings.shift());
assert.equal("{ slashes: '\\\\\\\\' }\n", strings.shift());
assert.equal('inspect\n', strings.shift());
assert.equal("{ foo: 'bar', inspect: [Function] }\n", strings.shift());
assert.equal("{ foo: 'bar', inspect: [Function] }\n", strings.shift());
assert.equal("{ foo: 'bar', inspect: [Function: inspect] }\n", strings.shift());
assert.equal("{ foo: 'bar', inspect: [Function: inspect] }\n", strings.shift());
assert.notEqual(-1, strings.shift().indexOf('foo: [Object]'));
assert.equal(-1, strings.shift().indexOf('baz'));
assert.equal('Trace: This is a {"formatted":"trace"} 10 foo',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-exec-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var spawn = require('child_process').spawn;
if (process.argv[2] === 'child') {
process.stdout.write(JSON.stringify(process.execArgv));
} else {
var execArgv = ['--harmony_proxies', '--stack-size=256'];
var execArgv = ['--stack-size=256'];
var args = [__filename, 'child', 'arg0'];
var child = spawn(process.execPath, execArgv.concat(args));
var out = '';
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function error_test() {
{ 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() { } })()',
expect: /^SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function/ },
expect: /^SyntaxError: In strict mode code, functions can only be declared at top level or inside a block./ },
// Named functions can be used:
{ client: client_unix, send: 'function blah() { return 1; }',
expect: prompt_unix },
Expand Down Expand Up @@ -228,7 +228,7 @@ function error_test() {
expect: 'Invalid REPL keyword\n' + prompt_unix },
// fail when we are not inside a String and a line continuation is used
{ client: client_unix, send: '[] \\',
expect: /^SyntaxError: Unexpected token ILLEGAL/ },
expect: /^SyntaxError: Invalid or unexpected token/ },
// do not fail when a String is created with line continuation
{ client: client_unix, send: '\'the\\\nfourth\\\neye\'',
expect: prompt_multiline + prompt_multiline +
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ assert.equal(util.inspect([1, [2, 3]]), '[ 1, [ 2, 3 ] ]');

assert.equal(util.inspect({}), '{}');
assert.equal(util.inspect({a: 1}), '{ a: 1 }');
assert.equal(util.inspect({a: function() {}}), '{ a: [Function] }');
assert.equal(util.inspect({a: function() {}}), '{ a: [Function: a] }');
assert.equal(util.inspect({a: 1, b: 2}), '{ a: 1, b: 2 }');
assert.equal(util.inspect({'a': {}}), '{ a: {} }');
assert.equal(util.inspect({'a': {'b': 2}}), '{ a: { b: 2 } }');
Expand Down Expand Up @@ -212,7 +212,7 @@ assert.equal(util.inspect(value), '[ 1, 2, 3, growingLength: [Getter] ]');
// Function with properties
value = function() {};
value.aprop = 42;
assert.equal(util.inspect(value), '{ [Function] aprop: 42 }');
assert.equal(util.inspect(value), '{ [Function: value] aprop: 42 }');

// Regular expressions with properties
value = /123/ig;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-util-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var tests = [
{input: null, output: 'null'},
{input: false, output: 'false'},
{input: 42, output: '42'},
{input: function() {}, output: '[Function]'},
{input: function() {}, output: '[Function: input]'},
{input: parseInt('not a number', 10), output: 'NaN'},
{input: {answer: 42}, output: '{ answer: 42 }'},
{input: [1, 2, 3], output: '[ 1, 2, 3 ]'}
Expand Down

0 comments on commit a784d6f

Please sign in to comment.