mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Update TypeScript
This commit is contained in:
@@ -25,7 +25,8 @@ async function main(): Promise<void> {
|
||||
const testReporter = new TestReporter()
|
||||
await testReporter.run()
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
if (error instanceof Error) core.setFailed(error)
|
||||
else core.setFailed(JSON.stringify(error))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,8 @@ export class DartJsonParser implements TestParser {
|
||||
try {
|
||||
return JSON.parse(str)
|
||||
} catch (e) {
|
||||
const col = e.columnNumber !== undefined ? `:${e.columnNumber}` : ''
|
||||
const errWithCol = e as {columnNumber?: number}
|
||||
const col = errWithCol.columnNumber !== undefined ? `:${errWithCol.columnNumber}` : ''
|
||||
throw new Error(`Invalid JSON at ${path}:${i + 1}${col}\n\n${e}`)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user