11/* eslint-disable no-debugger */
22'use strict' ;
3- var common = require ( '../common' ) ;
4- var assert = require ( 'assert' ) ;
5- var vm = require ( 'vm' ) ;
6- var spawn = require ( 'child_process' ) . spawn ;
3+ const common = require ( '../common' ) ;
4+ const assert = require ( 'assert' ) ;
5+ const vm = require ( 'vm' ) ;
6+ const spawn = require ( 'child_process' ) . spawn ;
77
88assert . throws ( function ( ) {
99 vm . runInDebugContext ( '*' ) ;
@@ -21,8 +21,8 @@ assert.throws(function() {
2121 vm . runInDebugContext ( '(function(f) { f(f) })(function(f) { f(f) })' ) ;
2222} , / R a n g e E r r o r / ) ;
2323
24- assert . equal ( typeof vm . runInDebugContext ( 'this' ) , 'object' ) ;
25- assert . equal ( typeof vm . runInDebugContext ( 'Debug' ) , 'object' ) ;
24+ assert . strictEqual ( typeof vm . runInDebugContext ( 'this' ) , 'object' ) ;
25+ assert . strictEqual ( typeof vm . runInDebugContext ( 'Debug' ) , 'object' ) ;
2626
2727assert . strictEqual ( vm . runInDebugContext ( ) , undefined ) ;
2828assert . strictEqual ( vm . runInDebugContext ( 0 ) , 0 ) ;
@@ -46,11 +46,11 @@ assert.strictEqual(vm.runInDebugContext(undefined), undefined);
4646 debugger ;
4747 }
4848
49- assert . equal ( breaks , 0 ) ;
49+ assert . strictEqual ( breaks , 0 ) ;
5050 Debug . setListener ( ondebugevent ) ;
51- assert . equal ( breaks , 0 ) ;
51+ assert . strictEqual ( breaks , 0 ) ;
5252 breakpoint ( ) ;
53- assert . equal ( breaks , 1 ) ;
53+ assert . strictEqual ( breaks , 1 ) ;
5454}
5555
5656// Can set listeners and breakpoints on a single line file
@@ -73,24 +73,24 @@ assert.strictEqual(vm.runInDebugContext(undefined), undefined);
7373
7474// See https://github.com/nodejs/node/issues/1190, fatal errors should not
7575// crash the process.
76- var script = common . fixturesDir + '/vm-run-in-debug-context.js' ;
77- var proc = spawn ( process . execPath , [ script ] ) ;
78- var data = [ ] ;
76+ const script = common . fixturesDir + '/vm-run-in-debug-context.js' ;
77+ let proc = spawn ( process . execPath , [ script ] ) ;
78+ const data = [ ] ;
7979proc . stdout . on ( 'data' , common . fail ) ;
8080proc . stderr . on ( 'data' , data . push . bind ( data ) ) ;
8181proc . stderr . once ( 'end' , common . mustCall ( function ( ) {
82- var haystack = Buffer . concat ( data ) . toString ( 'utf8' ) ;
82+ const haystack = Buffer . concat ( data ) . toString ( 'utf8' ) ;
8383 assert ( / S y n t a x E r r o r : U n e x p e c t e d t o k e n \* / . test ( haystack ) ) ;
8484} ) ) ;
8585proc . once ( 'exit' , common . mustCall ( function ( exitCode , signalCode ) {
86- assert . equal ( exitCode , 1 ) ;
87- assert . equal ( signalCode , null ) ;
86+ assert . strictEqual ( exitCode , 1 ) ;
87+ assert . strictEqual ( signalCode , null ) ;
8888} ) ) ;
8989
9090proc = spawn ( process . execPath , [ script , 'handle-fatal-exception' ] ) ;
9191proc . stdout . on ( 'data' , common . fail ) ;
9292proc . stderr . on ( 'data' , common . fail ) ;
9393proc . once ( 'exit' , common . mustCall ( function ( exitCode , signalCode ) {
94- assert . equal ( exitCode , 42 ) ;
95- assert . equal ( signalCode , null ) ;
94+ assert . strictEqual ( exitCode , 42 ) ;
95+ assert . strictEqual ( signalCode , null ) ;
9696} ) ) ;
0 commit comments