mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Update TypeScript
This commit is contained in:
parent
8848447e3f
commit
4c7348c4be
4 changed files with 12 additions and 4585 deletions
4589
package-lock.json
generated
4589
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -60,7 +60,7 @@
|
|||
"js-yaml": "^4.0.0",
|
||||
"prettier": "2.2.1",
|
||||
"ts-jest": "^26.5.3",
|
||||
"typescript": "^4.2.3"
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"jest-junit": {
|
||||
"suiteName": "jest tests",
|
||||
|
|
|
|||
|
|
@ -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}`)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue