aboutsummaryrefslogtreecommitdiff
path: root/test/async-hooks/init-hooks.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/async-hooks/init-hooks.js')
-rw-r--r--test/async-hooks/init-hooks.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/async-hooks/init-hooks.js b/test/async-hooks/init-hooks.js
index 817b2db0c7..b10ec82719 100644
--- a/test/async-hooks/init-hooks.js
+++ b/test/async-hooks/init-hooks.js
@@ -158,7 +158,7 @@ class ActivityCollector {
// events this makes sense for a few tests in which we enable some hooks
// later
if (this._allowNoInit) {
- const stub = { uid, type: 'Unknown', handleIsObject: true };
+ const stub = { uid, type: 'Unknown', handleIsObject: true, handle: {} };
this._activities.set(uid, stub);
return stub;
} else if (!common.isMainThread) {
@@ -184,7 +184,8 @@ class ActivityCollector {
triggerAsyncId,
// In some cases (e.g. Timeout) the handle is a function, thus the usual
// `typeof handle === 'object' && handle !== null` check can't be used.
- handleIsObject: handle instanceof Object
+ handleIsObject: handle instanceof Object,
+ handle
};
this._stamp(activity, 'init');
this._activities.set(uid, activity);