diff --git a/test/parallel/test-async-hooks-promise-triggerid.js b/test/parallel/test-async-hooks-promise-triggerid.js index 467fddd359d..b860d60999e 100644 --- a/test/parallel/test-async-hooks-promise-triggerid.js +++ b/test/parallel/test-async-hooks-promise-triggerid.js @@ -13,8 +13,8 @@ async_hooks.createHook({ if (type === 'PROMISE') { // Check that the last known Promise is triggering the creation of // this one. - assert.strictEqual(promiseAsyncIds[promiseAsyncIds.length - 1] || 1, - triggerId); + assert.strictEqual(triggerId, + promiseAsyncIds[promiseAsyncIds.length - 1] || 1); promiseAsyncIds.push(id); } }, 3),