@@ -33,7 +33,7 @@ common.globalCheck = false;
33
33
34
34
// Run a string
35
35
const result = vm . runInNewContext ( '\'passed\';' ) ;
36
- assert . strictEqual ( 'passed' , result ) ;
36
+ assert . strictEqual ( result , 'passed' ) ;
37
37
38
38
// Thrown error
39
39
assert . throws ( ( ) => {
@@ -42,7 +42,7 @@ assert.throws(() => {
42
42
43
43
global . hello = 5 ;
44
44
vm . runInNewContext ( 'hello = 2' ) ;
45
- assert . strictEqual ( 5 , global . hello ) ;
45
+ assert . strictEqual ( global . hello , 5 ) ;
46
46
47
47
48
48
// Pass values in and out
@@ -54,9 +54,9 @@ global.obj = { foo: 0, baz: 3 };
54
54
/* eslint-disable no-unused-vars */
55
55
const baz = vm . runInNewContext ( global . code , global . obj ) ;
56
56
/* eslint-enable no-unused-vars */
57
- assert . strictEqual ( 1 , global . obj . foo ) ;
58
- assert . strictEqual ( 2 , global . obj . bar ) ;
59
- assert . strictEqual ( 2 , global . foo ) ;
57
+ assert . strictEqual ( global . obj . foo , 1 ) ;
58
+ assert . strictEqual ( global . obj . bar , 2 ) ;
59
+ assert . strictEqual ( global . foo , 2 ) ;
60
60
61
61
// Call a function by reference
62
62
function changeFoo ( ) { global . foo = 100 ; }
0 commit comments