We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5413b06 commit 59eb796Copy full SHA for 59eb796
1 file changed
packages/datadog-instrumentations/src/mocha.js
@@ -418,8 +418,13 @@ addHook({
418
419
// we store the original function, not to lose it
420
originalFns.set(newFn, this.fn)
421
-
422
this.fn = newFn
+
423
+ // Temporarily keep functionality when .asyncResource is removed from node
424
+ // in https://github.com/nodejs/node/pull/46432
425
+ if (!this.fn.asyncResource) {
426
+ this.fn.asyncResource = asyncResource
427
+ }
428
}
429
430
0 commit comments