Skip to content

Commit 1eb5817

Browse files
Jay BrownleeFishrock123
Jay Brownlee
authored andcommitted
test: refactor test-vm-syntax-error-stderr.js
use common.fail instead of assert(false) change var to let or const as appropriate PR-URL: #9900 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c456ca3 commit 1eb5817

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/parallel/test-vm-syntax-error-stderr.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
4-
var path = require('path');
5-
var child_process = require('child_process');
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const path = require('path');
5+
const child_process = require('child_process');
66

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

9-
var p = child_process.spawn(process.execPath, [
9+
const p = child_process.spawn(process.execPath, [
1010
'-e',
1111
'require(process.argv[1]);',
1212
wrong_script
1313
]);
1414

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

19-
var output = '';
19+
let output = '';
2020

2121
p.stderr.on('data', function(data) {
2222
output += data;

0 commit comments

Comments
 (0)