From 87eeb6b37351ca0c4cdb69e10a636e73f0e07361 Mon Sep 17 00:00:00 2001 From: Pascal Lambert Date: Fri, 12 Oct 2018 11:27:46 -0600 Subject: [PATCH] test: swap assert argument order in test-vm-create-and-run-in-context.js PR-URL: https://github.com/nodejs/node/pull/23525 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/parallel/test-vm-create-and-run-in-context.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-vm-create-and-run-in-context.js b/test/parallel/test-vm-create-and-run-in-context.js index 09f643aa90df46..8f4ce72c50f246 100644 --- a/test/parallel/test-vm-create-and-run-in-context.js +++ b/test/parallel/test-vm-create-and-run-in-context.js @@ -33,13 +33,13 @@ assert.strictEqual('passed', result); // 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 result = vm.runInContext('var foo = 3;', context); -assert.strictEqual(3, context.foo); -assert.strictEqual('lala', context.thing); +assert.strictEqual(context.foo, 3); +assert.strictEqual(context.thing, 'lala'); // https://github.com/nodejs/node/issues/5768 // Run in contextified sandbox without referencing the context