From 6c5b20a89f1862b45867424f93d963ec925e256f Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Thu, 28 Mar 2024 10:38:51 -0500 Subject: [PATCH] core: Add return type to test helper function --- packages/core/__tests__/core.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/__tests__/core.test.ts b/packages/core/__tests__/core.test.ts index 6f435bcb..afdf1d93 100644 --- a/packages/core/__tests__/core.test.ts +++ b/packages/core/__tests__/core.test.ts @@ -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+)\)/) || []