Skip to content

Commit

Permalink
core: Add return type to test helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMGreene committed Mar 28, 2024
1 parent bd74802 commit 6c5b20a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/__tests__/core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ const testEnvVars = {
const UUID = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
const DELIMITER = `ghadelimiter_${UUID}`

function extractErrorMetadata(error: Error) {
function extractErrorMetadata(error: Error): {
file: string | undefined
line: string | undefined
column: string | undefined
} {
const stackLines = error.stack?.split(os.EOL) || []
const firstTraceLine = stackLines[1]
const match = firstTraceLine.match(/at (?:.*) \((.*):(\d+):(\d+)\)/) || []
Expand Down

0 comments on commit 6c5b20a

Please sign in to comment.