Interface: ScanOptions
Inline
Properties
patterns?
optionalpatterns?:string[]
Glob patterns for the test files, relative to root. As in the runners, they match names that start with a dot too. Without them, the test files are those the configs in the root and the folders below it run, or for node:test and Bun those node --test and bun test run.
framework?
optionalframework?:"playwright"|"vitest"|"jest"|"mocha"|"jasmine"|"cypress"|"webdriverio"|"node"|"bun"
The runner whose tests are listed. Without it, the one the project uses: whose package a package.json in the root or below lists, whose config is there, or for node:test and Bun, run by a package.json script, else one a package.json above the root lists. With none of them or several, the scan throws a TypeError that names them.
root?
optionalroot?:string
The project root. Paths in the output are relative to it. Defaults to the current directory.
ignore?
optionalignore?:string[]
Glob patterns to leave out, in addition to node_modules and .git.
frameworkVersion?
optionalframeworkVersion?:string
The framework version whose rules apply, instead of the one read from the project.
comments?
optionalcomments?:"all"|"non-active"|"none"
Which tests get the comments above them. Defaults to non-active.
expandCases?
optionalexpandCases?:boolean
One test or describe per case of a .each or .for table and per pass of a loop whose values the scan can work out, each with the title the runner gives it. Defaults to false: one record per declaration.
signal?
optionalsignal?:AbortSignal
Stops the scan when it aborts: the scan checks it before it starts and between files, and then rejects with the signal's reason, as fetch does.