Skip to content

Commit 47784c4

Browse files
andy-ganchrowjasnell
authored andcommitted
test: fix assert.strictEqual argument order
PR-URL: #23457 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent ce7555d commit 47784c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-vm-new-script-new-context.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const Script = require('vm').Script;
3030
const script = new Script('\'passed\';');
3131
const result1 = script.runInNewContext();
3232
const result2 = script.runInNewContext();
33-
assert.strictEqual('passed', result1);
34-
assert.strictEqual('passed', result2);
33+
assert.strictEqual(result1, 'passed');
34+
assert.strictEqual(result2, 'passed');
3535
}
3636

3737
{
@@ -52,7 +52,7 @@ const Script = require('vm').Script;
5252
global.hello = 5;
5353
const script = new Script('hello = 2');
5454
script.runInNewContext();
55-
assert.strictEqual(5, global.hello);
55+
assert.strictEqual(global.hello, 5);
5656

5757
// Cleanup
5858
delete global.hello;
@@ -68,9 +68,9 @@ const Script = require('vm').Script;
6868
/* eslint-disable no-unused-vars */
6969
const baz = script.runInNewContext(global.obj);
7070
/* eslint-enable no-unused-vars */
71-
assert.strictEqual(1, global.obj.foo);
72-
assert.strictEqual(2, global.obj.bar);
73-
assert.strictEqual(2, global.foo);
71+
assert.strictEqual(global.obj.foo, 1);
72+
assert.strictEqual(global.obj.bar, 2);
73+
assert.strictEqual(global.foo, 2);
7474

7575
// cleanup
7676
delete global.code;

0 commit comments

Comments
 (0)