From 1ef39154ec3f423bc5a115566da7c67736f033ea Mon Sep 17 00:00:00 2001 From: legendecas Date: Wed, 25 Oct 2023 00:03:11 +0800 Subject: [PATCH] test: fix vm assertion actual and expected order --- 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); } }