mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
Not every failure has a stack trace.
This commit is contained in:
parent
e9fa2f582c
commit
c37ad22b74
1 changed files with 2 additions and 2 deletions
|
|
@ -19,6 +19,6 @@ export function parseIsoDate(str: string): Date {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFirstNonEmptyLine(stackTrace: string): string | undefined {
|
export function getFirstNonEmptyLine(stackTrace: string): string | undefined {
|
||||||
const lines = stackTrace.split(/\r?\n/g)
|
const lines = stackTrace?.split(/\r?\n/g)
|
||||||
return lines.find(str => !/^\s*$/.test(str))
|
return lines?.find(str => !/^\s*$/.test(str))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue