Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update test to use common.fail #9900

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions test/parallel/test-vm-syntax-error-stderr.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
var child_process = require('child_process');
const common = require('../common');
const assert = require('assert');
const path = require('path');
const child_process = require('child_process');

var wrong_script = path.join(common.fixturesDir, 'cert.pem');
const wrong_script = path.join(common.fixturesDir, 'cert.pem');

var p = child_process.spawn(process.execPath, [
const p = child_process.spawn(process.execPath, [
'-e',
'require(process.argv[1]);',
wrong_script
]);

p.stdout.on('data', function(data) {
assert(false, 'Unexpected stdout data: ' + data);
common.fail('Unexpected stdout data: ' + data);
});

var output = '';
let output = '';

p.stderr.on('data', function(data) {
output += data;
Expand Down