Skip to content

Commit 87eeb6b

Browse files
lefrogjasnell
authored andcommitted
test: swap assert argument order in test-vm-create-and-run-in-context.js
PR-URL: #23525 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 66d4ac1 commit 87eeb6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-vm-create-and-run-in-context.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ assert.strictEqual('passed', result);
3333

3434
// Create a new pre-populated context
3535
context = vm.createContext({ 'foo': 'bar', 'thing': 'lala' });
36-
assert.strictEqual('bar', context.foo);
37-
assert.strictEqual('lala', context.thing);
36+
assert.strictEqual(context.foo, 'bar');
37+
assert.strictEqual(context.thing, 'lala');
3838

3939
// Test updating context
4040
result = vm.runInContext('var foo = 3;', context);
41-
assert.strictEqual(3, context.foo);
42-
assert.strictEqual('lala', context.thing);
41+
assert.strictEqual(context.foo, 3);
42+
assert.strictEqual(context.thing, 'lala');
4343

4444
// https://github.com/nodejs/node/issues/5768
4545
// Run in contextified sandbox without referencing the context

0 commit comments

Comments
 (0)