Skip to content

Commit

Permalink
no finally
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 28, 2019
1 parent 32e59a8 commit b52b8c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/jest-circus/src/utils.ts
Expand Up @@ -231,19 +231,18 @@ export const callAsyncCircusFn = (
return resolve();
})
.then(() => {
completed = true;
// If timeout is not cleared/unrefed the node process won't exit until
// it's resolved.
timeoutID.unref && timeoutID.unref();
clearTimeout(timeoutID);
})
.catch(error => {
completed = true;
timeoutID.unref && timeoutID.unref();
clearTimeout(timeoutID);
throw error;
})
.finally(() => {
completed = true;
});
};

export const getTestDuration = (test: TestEntry): number | null => {
Expand Down

0 comments on commit b52b8c6

Please sign in to comment.