Skip to content

Commit 1eb5817

Browse files
Jay BrownleeFishrock123
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‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
4-
varpath=require('path');
5-
varchild_process=require('child_process');
2+
constcommon=require('../common');
3+
constassert=require('assert');
4+
constpath=require('path');
5+
constchild_process=require('child_process');
66

7-
varwrong_script=path.join(common.fixturesDir,'cert.pem');
7+
constwrong_script=path.join(common.fixturesDir,'cert.pem');
88

9-
varp=child_process.spawn(process.execPath,[
9+
constp=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-
varoutput='';
19+
letoutput='';
2020

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

0 commit comments

Comments
(0)