@@ -12,7 +12,7 @@ common.globalCheck = false;
12
12
13
13
// Run a string
14
14
const result = vm . runInNewContext ( '\'passed\';' ) ;
15
- assert . strictEqual ( 'passed' , result ) ;
15
+ assert . strictEqual ( result , 'passed' ) ;
16
16
17
17
// Thrown error
18
18
assert . throws ( ( ) => {
@@ -21,7 +21,7 @@ assert.throws(() => {
21
21
22
22
global . hello = 5 ;
23
23
vm . runInNewContext ( 'hello = 2' ) ;
24
- assert . strictEqual ( 5 , global . hello ) ;
24
+ assert . strictEqual ( global . hello , 5 ) ;
25
25
26
26
27
27
// Pass values in and out
@@ -33,9 +33,9 @@ global.obj = { foo: 0, baz: 3 };
33
33
/* eslint-disable no-unused-vars */
34
34
const baz = vm . runInNewContext ( global . code , global . obj ) ;
35
35
/* eslint-enable no-unused-vars */
36
- assert . strictEqual ( 1 , global . obj . foo ) ;
37
- assert . strictEqual ( 2 , global . obj . bar ) ;
38
- assert . strictEqual ( 2 , global . foo ) ;
36
+ assert . strictEqual ( global . obj . foo , 1 ) ;
37
+ assert . strictEqual ( global . obj . bar , 2 ) ;
38
+ assert . strictEqual ( global . foo , 2 ) ;
39
39
40
40
// Call a function by reference
41
41
function changeFoo ( ) { global . foo = 100 ; }
0 commit comments