From 4770c3f973fa2f4f7a85edda8f77b9c9ac0fe288 Mon Sep 17 00:00:00 2001 From: Lee Gray Date: Fri, 12 Oct 2018 10:23:09 -0700 Subject: [PATCH] test: fix assert order in test-vm-context --- test/parallel/test-vm-context.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index 31ed69da93fabc..e1cfd145f226ad 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -30,18 +30,18 @@ let script = new Script('"passed";'); // Run in a new empty context let context = vm.createContext(); let result = script.runInContext(context); -assert.strictEqual('passed', result); +assert.strictEqual(result, 'passed'); // Create a new pre-populated context context = vm.createContext({ 'foo': 'bar', 'thing': 'lala' }); -assert.strictEqual('bar', context.foo); -assert.strictEqual('lala', context.thing); +assert.strictEqual(context.foo, 'bar'); +assert.strictEqual(context.thing, 'lala'); // Test updating context script = new Script('foo = 3;'); result = script.runInContext(context); -assert.strictEqual(3, context.foo); -assert.strictEqual('lala', context.thing); +assert.strictEqual(context.foo, 3); +assert.strictEqual(context.thing, 'lala'); // Issue GH-227: common.expectsError(() => {