Skip to content

Commit e63c4c5

Browse files
authored
feat!: convert parameter of table handles all states (#417)
1 parent 3a0e948 commit e63c4c5

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/bench.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,7 @@ export class Bench extends EventTarget {
237237
table (
238238
convert = defaultConvertTaskResultForConsoleTable
239239
): (null | Record<string, number | string | undefined>)[] {
240-
return this.tasks.map(task => {
241-
/* eslint-disable perfectionist/sort-objects */
242-
return task.result.state === 'errored'
243-
? {
244-
'Task name': task.name,
245-
Error: task.result.error.message,
246-
Stack: task.result.error.stack,
247-
}
248-
: convert(task)
249-
/* eslint-enable perfectionist/sort-objects */
250-
})
240+
return this.tasks.map(convert)
251241
}
252242

253243
/**

0 commit comments

Comments
 (0)