interface FileCoverageSummary

Per-file line coverage, when coverage was requested.

const file: FileCoverageSummary =
  { path: 'lib/cart.ts', coveredLines: 18, coverableLines: 20, percent: 90 };
file.percent; // 90

Properties

path: string

Path relative to the project root, with forward slashes.

Lines executed at least once.

Lines the source map attributes to executable positions in the bundle.

percent: number

coveredLines / coverableLines, as a percentage rounded to two decimals.

Usage

import { type FileCoverageSummary } from "lib/api/test.ts";