Resolves file#34 line targets into exact QUnit selections.
Resolves line targets against an ALREADY-parsed scan. Split out so --search, which has scanned
every file for its listing, can resolve line targets without reading and esbuild-transforming
those files a second time.
Result of resolving a file's line targets into selectors, plus any diagnostics to surface.
-
selectors: QUnitSelector[] | null
Selectors to apply, or null to run the whole file unfiltered.
-
warnings: string[]
#-prefixed lines to print — always explains why a target did not narrow as asked.
One thing a file#34 target selects. test omitted means "this module and everything nested
under it" — used for module targets, and as the fallback when a test's name is computed and so
cannot be matched exactly.
-
module: string
Full module path, ' > '-joined. '' for a top-level test.
-
test: string
Exact test name; omitted to select the whole module and its nested children.
Usage
import * as mod from "lib/selection/line-targets.ts";