Scan diagnostics
scan_diagnosticsLists parse, import, and value problems found while reading test files, explaining missing or notLoaded tests. Use when another tool reports scanErrors or to inspect error and warning diagnostics.
Instructions
Lists the problems test-inventory found while reading the test files: level error means tests may be missing from the other answers (a file that failed to parse, an import it could not follow), level warning means a value is missing or approximate (a title built at run time, a tag that is not a string). They are about reading the code, not test failures. Use it when another tool reports scanErrors, or to check why a test is missing or notLoaded. Answers are paged: follow nextCursor. Example: {"levels": ["error"]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Keeps problems in this file, or in the files under this folder, relative to `directory`. | |
| codes | No | Keeps problems with these codes. | |
| limit | No | The most items to return. | |
| cursor | No | nextCursor from the previous answer, for the next page. Keep the other arguments the same. | |
| levels | No | Keeps problems of these levels. | |
| patterns | No | Globs of the test files, relative to `directory`, such as ["tests/**/*.spec.ts"]. Default: the ones the server was started with. | |
| directory | No | A folder inside the project to scan, relative to its root, such as "packages/web". Default: the root. | |
| framework | No | The test runner. Default: the one the server was started with. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | Yes | ||
| total | Yes | All matching items, on every page. | |
| framework | Yes | ||
| nextCursor | Yes | ||
| diagnostics | Yes | One page of problems, in file order. | |
| frameworkVersion | Yes |