interface ParsedFlags

The flag object a successful parse() carries — CLI flags only, before package.json merge.

import * as Args from './index.ts';

// Defined, not invoked: the shape is what parse(projectRoot) yields on the success branch.
function flagsOf(projectRoot: string) {
  const parsed = Args.parse(projectRoot);
  return Args.InvalidFlag.is(parsed) ? null : { inputs: parsed.inputs, watch: parsed.watch };
}

Properties

inputs: string[]

Absolute paths of the test targets, deduplicated. .html fixtures and #line suffixes are split out into htmlPaths and lineTargets rather than kept here.

optional
debug: boolean

--debug/--console: print the server URL and forward the page's console.

optional
watch: boolean

--watch/-w: re-run on every save instead of exiting after one run.

optional
open: boolean | string

--open/-o: open the output in a browser; a string names a specific binary.

optional
failFast: boolean

--failFast: stop at the first failing test.

optional
onlyFailed: boolean

--only-failed/-f: run only the files that failed on the previous run.

optional
timeout: number

--timeout: milliseconds a single test may take before the run is declared stalled.

optional
output: string

--output: directory for the compiled bundle and HTML.

optional
htmlPaths: string[]

Positional .html fixtures the test bundle is injected into.

optional
port: number

--port/-p: the port the local test server listens on.

optional
portExplicit: boolean

true when --port was given explicitly, so a busy port fails instead of incrementing.

optional
extensions: string[]

--extensions: file extensions treated as test files.

optional
browser: "chromium" | "firefox" | "webkit"

--browser: the engine to run in.

optional
before: string | false

--before: module run before the tests, or false to disable a configured one.

optional
after: string | false

--after: module run after the tests, or false to disable a configured one.

optional
changedSince: string

--since/--changed: run only files whose transitive imports changed since this git ref.

--reporter/-r: the single stdout format.

optional
junit: boolean | string

--junit: write a JUnit report. true uses the default path; a string overrides it.

optional
coverage: boolean

--coverage: collect V8 line coverage.

optional
coverageFormats: string[]

Artifact formats beyond the terminal summary (lcov, html).

optional
filter: string

-t/--filter/-m/--module/-n: the one test-name matcher, in QUnit's own semantics.

optional
lineTargets: Record<string, number[]>

Absolute path → the #34 line targets given for it.

optional
wholeInputPaths: string[]

Absolute paths mentioned WITHOUT a line target — whole-file requests that supersede a line target.