Skip to content

Commit

Permalink
no deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 19, 2023
1 parent 751eec5 commit b0d7c51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-core/src/collectHandles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ export function formatHandleErrors(
return;
}

const stackText = ansiFree.substr(ansiFree.indexOf(match[1])).trim();
const stackText = ansiFree.slice(ansiFree.indexOf(match[1])).trim();

const name = ansiFree.match(/(?<=● {2}).*$/m);
if (!name?.length) {
if (name == null || name.length === 0) {
return;
}

Expand Down

0 comments on commit b0d7c51

Please sign in to comment.