Skip to content

Commit

Permalink
test: refactor test-vm-syntax-error-stderr.js
Browse files Browse the repository at this point in the history
use common.fail instead of assert(false)
change var to let or const as appropriate

PR-URL: #9900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Jay Brownlee authored and MylesBorins committed Dec 21, 2016
1 parent 3cd6232 commit 2eaf945
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 2eaf945

Please sign in to comment.