From 099f5cfa0a7bab5390673d6d9185bebe6351aa7d Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 26 Oct 2023 15:46:21 +0800 Subject: [PATCH] test: fix vm assertion actual and expected order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/50371 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel Reviewed-By: Vinícius Lourenço Claro Cardoso --- test/parallel/test-vm-module-dynamic-import.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-vm-module-dynamic-import.js b/test/parallel/test-vm-module-dynamic-import.js index b74d3b28d7a547..bd542ca9202513 100644 --- a/test/parallel/test-vm-module-dynamic-import.js +++ b/test/parallel/test-vm-module-dynamic-import.js @@ -40,7 +40,7 @@ async function test() { }); const result = s.runInThisContext(); - assert.strictEqual(foo.namespace, await result); + assert.strictEqual(await result, foo.namespace); } { @@ -53,7 +53,7 @@ async function test() { }); await m.link(common.mustNotCall()); await m.evaluate(); - assert.strictEqual(foo.namespace, await globalThis.fooResult); + assert.strictEqual(await globalThis.fooResult, foo.namespace); delete globalThis.fooResult; } @@ -68,7 +68,7 @@ async function test() { }); const result = s.runInThisContext(); - assert.strictEqual(foo.namespace, await result); + assert.strictEqual(await result, foo.namespace); } }