@@ -26,7 +26,7 @@ const vm = require('vm');
26
26
27
27
// Run a string
28
28
const result = vm . runInThisContext ( '\'passed\';' ) ;
29
- assert . strictEqual ( 'passed' , result ) ;
29
+ assert . strictEqual ( result , 'passed' ) ;
30
30
31
31
// thrown error
32
32
assert . throws ( function ( ) {
@@ -35,7 +35,7 @@ assert.throws(function() {
35
35
36
36
global . hello = 5 ;
37
37
vm . runInThisContext ( 'hello = 2' ) ;
38
- assert . strictEqual ( 2 , global . hello ) ;
38
+ assert . strictEqual ( global . hello , 2 ) ;
39
39
40
40
41
41
// pass values
@@ -48,14 +48,14 @@ global.obj = { foo: 0, baz: 3 };
48
48
/* eslint-disable no-unused-vars */
49
49
const baz = vm . runInThisContext ( code ) ;
50
50
/* eslint-enable no-unused-vars */
51
- assert . strictEqual ( 0 , global . obj . foo ) ;
52
- assert . strictEqual ( 2 , global . bar ) ;
53
- assert . strictEqual ( 1 , global . foo ) ;
51
+ assert . strictEqual ( global . obj . foo , 0 ) ;
52
+ assert . strictEqual ( global . bar , 2 ) ;
53
+ assert . strictEqual ( global . foo , 1 ) ;
54
54
55
55
// call a function
56
56
global . f = function ( ) { global . foo = 100 ; } ;
57
57
vm . runInThisContext ( 'f()' ) ;
58
- assert . strictEqual ( 100 , global . foo ) ;
58
+ assert . strictEqual ( global . foo , 100 ) ;
59
59
60
60
common . allowGlobals (
61
61
global . hello ,
0 commit comments