function search
search(options?: UserRunOptions | string | string[]): Task<SearchResult, RunFailure>

Lists the tests a selection would run, without running them.

No browser, no bundle, no execution — the answer comes from parsing the declarations, so it returns in milliseconds even for a large suite. The same scanner file.ts#34 line targets use, and the same filter matcher a real run applies, so the preview is what would actually be selected.

import { search } from './search.ts';

// Defined, not invoked: reads and parses the project's test files.
async function whatMatches() {
  const { matches } = await search({ filter: 'Cart' });
  return matches.map((one) => `${one.fullName}  ${one.file}#${one.line}`);
}

Parameters

optional
options: UserRunOptions | string | string[]

Return Type

Usage

import { search } from "lib/api/search.ts";