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: #6482
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
ofrobots committed Aug 25, 2016
1 parent 66e66e5 commit cda8bfc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 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 @@ -111,8 +111,8 @@ for (const expected of expectedStrings) {
assert.equal(expected + '\n', errStrings.shift()); // console.warn (stderr)
}

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.ok(/^label: \d+\.\d{3}ms$/.test(strings.shift().trim()));
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
6 changes: 3 additions & 3 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: /\bSyntaxError: Unexpected eval or arguments in strict mode/ },
{ client: client_unix, send: '(function() { "use strict"; if (true) function f() { } })()',
expect: /\bSyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function/ },
expect: /\bSyntaxError: 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: /\bSyntaxError: Unexpected token ILLEGAL/ },
expect: /\bSyntaxError: 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 Expand Up @@ -327,7 +327,7 @@ function error_test() {
// Illegal token is not recoverable outside string literal, RegExp literal,
// or block comment. https://github.com/nodejs/node/issues/3611
{ client: client_unix, send: 'a = 3.5e',
expect: /\bSyntaxError: Unexpected token ILLEGAL/ },
expect: /\bSyntaxError: Invalid or unexpected token/ },
// Mitigate https://github.com/nodejs/node/issues/548
{ client: client_unix, send: 'function name(){ return "node"; };name()',
expect: "'node'\n" + prompt_unix },
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-util-inspect-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ assert.strictEqual(target, details[0]);
assert.strictEqual(handler, details[1]);

assert.strictEqual(util.inspect(proxyObj, opts),
'Proxy [ {}, { get: [Function] } ]');
'Proxy [ {}, { get: [Function: get] } ]');

// Using getProxyDetails with non-proxy returns undefined
assert.strictEqual(processUtil.getProxyDetails({}), undefined);
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 @@ -25,7 +25,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 @@ -225,7 +225,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 cda8bfc

Please sign in to comment.