test:refactor createHook test

PR-URL: https://github.com/nodejs/node/pull/30568
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
Jeny 2019-11-20 22:42:47 +01:00 committed by Gireesh Punathil
parent c14c476614
commit 246557eb11

View File

@ -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),