Skip to content

Function: scan() ​

scan(options): Promise<Inventory>

Scans the test files that match patterns under root, one file at a time.

Throws a TypeError for invalid options. Problems with files and code are reported as diagnostics.

Parameters ​

options ​

patterns ​

string[]

Glob patterns for the test files, relative to root.

framework ​

"playwright" | "vitest"

root? ​

string

The project root. Paths in the output are relative to it. Defaults to the current directory.

ignore? ​

string[]

Glob patterns to leave out, in addition to node_modules.

frameworkVersion? ​

string

The framework version whose rules apply, instead of the one read from the project.

comments? ​

"all" | "non-active" | "none"

Which tests get the comments above them. Defaults to non-active.

Returns ​

Promise<Inventory>