From 21ac42bb97472b38d8aa5809c2a4e66eccc2c155 Mon Sep 17 00:00:00 2001 From: andy addington Date: Fri, 12 Oct 2018 09:30:12 -0700 Subject: [PATCH] test: fix assert.strictEqual argument order PR-URL: https://github.com/nodejs/node/pull/23457 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-vm-new-script-new-context.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index b0ef06756bee6d..482b4130d615d9 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -30,8 +30,8 @@ const Script = require('vm').Script; const script = new Script('\'passed\';'); const result1 = script.runInNewContext(); const result2 = script.runInNewContext(); - assert.strictEqual('passed', result1); - assert.strictEqual('passed', result2); + assert.strictEqual(result1, 'passed'); + assert.strictEqual(result2, 'passed'); } { @@ -52,7 +52,7 @@ const Script = require('vm').Script; global.hello = 5; const script = new Script('hello = 2'); script.runInNewContext(); - assert.strictEqual(5, global.hello); + assert.strictEqual(global.hello, 5); // Cleanup delete global.hello; @@ -68,9 +68,9 @@ const Script = require('vm').Script; /* eslint-disable no-unused-vars */ const baz = script.runInNewContext(global.obj); /* eslint-enable no-unused-vars */ - assert.strictEqual(1, global.obj.foo); - assert.strictEqual(2, global.obj.bar); - assert.strictEqual(2, global.foo); + assert.strictEqual(global.obj.foo, 1); + assert.strictEqual(global.obj.bar, 2); + assert.strictEqual(global.foo, 2); // cleanup delete global.code;