Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Drarig29 committed Oct 29, 2024
1 parent 41d65d4 commit 95806b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/synthetics/utils/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ export const hasResultPassed = (
return result.status === 'passed'
}

/**
* Whether the result is of type {@link BaseResult}, i.e. it wasn't skipped.
*/
export const isBaseResult = (result: Result): result is BaseResult => {
return !isResultSkippedBySelectiveRerun(result)
}

/**
* Whether the result has a defined {@link BaseResult.result} property.
*/
export const hasDefinedResult = (result: Result): result is BaseResult & {result: ServerResult} => {
return !isResultSkippedBySelectiveRerun(result) && result.result !== undefined
return isBaseResult(result) && result.result !== undefined
}

/**
Expand Down

0 comments on commit 95806b9

Please sign in to comment.