jest-doctor 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ const patchPromiseConcurrency = (that) => {
6
6
  const getRootIds = () => {
7
7
  let triggerId = (0, node_async_hooks_1.executionAsyncId)();
8
8
  const rootIds = [triggerId];
9
- while (triggerId !== that.asyncRoot) {
9
+ while (triggerId !== that.asyncRoot && triggerId) {
10
10
  triggerId = that.asyncIdToParentId.get(triggerId);
11
11
  rootIds.push(triggerId);
12
12
  }
@@ -31,7 +31,7 @@ const patchPromiseConcurrency = (that) => {
31
31
  }
32
32
  });
33
33
  let promiseToDelete = concurrentPromise;
34
- while (!rootIds.includes(asyncId)) {
34
+ while (!rootIds.includes(asyncId) && asyncId) {
35
35
  const parentId = that.asyncIdToParentId.get(asyncId);
36
36
  cleanPromise(promises, promiseToDelete, asyncId);
37
37
  asyncId = parentId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-doctor",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "jest environment for leak detection",
5
5
  "license": "MIT",
6
6
  "author": "Stephan Dum",