export function shouldTakeScreenshot()

in packages/synthetics-sdk-broken-links/src/link_utils.ts [294:304]


export function shouldTakeScreenshot(
  options: BrokenLinksResultV1_BrokenLinkCheckerOptions,
  passed: boolean
): boolean {
  return (
    options.screenshot_options!.capture_condition === ApiCaptureCondition.ALL ||
    (options.screenshot_options!.capture_condition ===
      ApiCaptureCondition.FAILING &&
      !passed)
  );
}