From ae710f86ddafa89d5ad15084912ba26cd5569c96 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 --- 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