Skip to content

Commit e9efac6

Browse files
lee-grayjasnell
authored andcommitted
test: fix assert order in test-vm-context
PR-URL: #23523 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent ba5cf7b commit e9efac6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-vm-context.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ let script = new Script('"passed";');
3030
// Run in a new empty context
3131
let context = vm.createContext();
3232
let result = script.runInContext(context);
33-
assert.strictEqual('passed', result);
33+
assert.strictEqual(result, 'passed');
3434

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

4040
// Test updating context
4141
script = new Script('foo = 3;');
4242
result = script.runInContext(context);
43-
assert.strictEqual(3, context.foo);
44-
assert.strictEqual('lala', context.thing);
43+
assert.strictEqual(context.foo, 3);
44+
assert.strictEqual(context.thing, 'lala');
4545

4646
// Issue GH-227:
4747
common.expectsError(() => {

0 commit comments

Comments
 (0)