Skip to content

Commit e569539

Browse files
committed
lint
1 parent c518fae commit e569539

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/jest-core/src/collectHandles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function formatHandleErrors(
164164
): Array<string> {
165165
const stacks = new Map<string, {stack: string; names: Set<string>}>();
166166

167-
errors.forEach(err => {
167+
for (const err of errors) {
168168
const formatted = formatExecError(
169169
err,
170170
config,
@@ -179,14 +179,14 @@ export function formatHandleErrors(
179179
const ansiFree: string = stripAnsi(formatted);
180180
const match = ansiFree.match(/\s+at(.*)/);
181181
if (!match || match.length < 2) {
182-
return;
182+
continue;
183183
}
184184

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

187187
const name = ansiFree.match(/(?<= {2}).*$/m);
188188
if (name == null || name.length === 0) {
189-
return;
189+
continue;
190190
}
191191

192192
const stack = stacks.get(stackText) || {
@@ -197,7 +197,7 @@ export function formatHandleErrors(
197197
stack.names.add(name[0]);
198198

199199
stacks.set(stackText, stack);
200-
});
200+
}
201201

202202
return Array.from(stacks.values()).map(({stack, names}) =>
203203
stack.replace('%%OBJECT_NAME%%', Array.from(names).join(',')),

0 commit comments

Comments
 (0)