Skip to content

Diagnostics ​

A diagnostic is part of the output, not a failure: the scan always finishes and exits with 0. Its level is error when tests may be missing from the output, and warning when a value is missing or approximate.

Files and imports ​

CodeLevelWhen
read-errorerrorA test file or a folder could not be read, or a test file is a link to a file that does not exist.
parse-errorerrorThe file has a syntax error. When the parser recovers, the tests it read are kept.
internal-errorerrorReading the file failed unexpectedly. Please report it with the file if you can. The scan goes on with the next file.
framework-mismatcherrorThe file imports another framework, such as Vitest in a Playwright scan or @jest/globals in a Vitest scan.
unresolved-test-importerrorA call shaped like a test, outside any test or hook body, uses a name imported from a module that could not be followed: a missing or broken file, an installed package, or a file that re-exports or builds the test object from another module. The name reads like a test function, as test or checkoutTest do, or is followed by a member such as .describe. The message says why.
invalid-importerrorVitest imported in a way it does not support: a default import, or require('vitest').
no-files-matchedwarningNo test file matches the patterns. When a pattern names a folder, the message suggests a pattern for the test files in it. The command line also says so on standard error.
unsupported-filewarningA file that matches the patterns is not JavaScript or TypeScript, so it is not read.
symlink-ignoredwarningA Playwright test file is reached through a symbolic link, which Playwright does not follow.
local-test-objectwarningA variable named like a test object is created by a call the scan cannot follow, as in const it = await createTester(). Its calls shaped like tests are read as tests.
globals-not-enabledwarningA Vitest file uses describe, it or test without importing them, and no config with globals: true was found.
unknown-framework-versionwarningThe framework version could not be read from the project; the newest rules apply.
approximate-framework-versionwarningOnly a version range was found, such as ^4.0.0 in package.json; the rules of the newest release in that major apply.
unsupported-framework-versionwarningThe project uses a version older than Playwright 1.42 or Vitest 3.0.

Declarations ​

CodeLevelWhen
invalid-chainerrorA chain the framework does not have, such as test.only.skip in Playwright, or one that needs a newer version.
test-without-bodyerrorPlaywright test('title') without a function, which makes Playwright fail to load the file and run no tests at all.
describe-not-callederrorVitest describe(fn) without a title. Vitest never calls the function.
async-describeerrorA Playwright describe callback that awaits. Playwright does not wait for it: tests declared after the first await end up in the describe around it, or are not collected at all.
tag-without-aterrorA Playwright tag that does not start with @, which makes Playwright fail to load the file and run no tests at all.
removed-apierrorAn API the framework version removed: Vitest 5 sequential and bench, vi.mock, vi.unmock or vi.hoisted below the top level of the file from Vitest 5, or options as the third argument from Vitest 4. Vitest fails the file.
duplicate-iderrorTwo records in a file have the same id. Ids include a position among equal titles, so only a hash collision causes this.
duplicate-titlewarning, error in PlaywrightPlaywright: two tests in the file have the same title path, without anonymous describes, so Playwright fails to load the file and runs no tests at all. Vitest: two tests in the same describe have the same title.
state-in-helperwarningA test.skip(), test.fixme(), test.fail() or describe.configure() is in a function that the file exports or never calls, so it is not applied to any record.
skip-without-bodywarningPlaywright test.skip('title') without a function: Playwright reads the title as a condition and skips every test in the scope.
nested-testwarningA test or describe declared inside a test body or hook. The runner does not collect it, so it is not listed.
only-in-skipped-describewarningA test with .only inside a skipped describe. It is still skipped.

Values ​

CodeLevelWhen
dynamic-titlewarningA title could not be worked out, for example a template with a loop variable. The record uses its source text.
dynamic-reasonwarningThe reason of a skip, fixme or fail could not be worked out to a string. The record uses its source text, with hasDynamicReason: true.
unresolved-tagwarningA tag comes from a value that could not be worked out, usually an import. The tag is missing from the record.
unresolved-annotationwarningThe same for an annotation.
unresolved-optionwarningAn options object, a spread in one, a lock, a Vitest flag such as concurrent or only, or a meta value could not be worked out. What it would set is missing from the record.
unresolved-caseswarningThe cases of .each or .for could not be counted; caseCount is null.
test-in-loopwarningThe test is declared in a loop. It is listed once, while the runner creates one test per iteration.
test-in-functionwarningThe test is declared in a function with a name that is not called exactly once from where it is written: it is called several times or from another describe, never called by name, or exported. The runner registers the test at each call, in the describe around the call; the record stays where the test is written. See limits.
config-may-change-statewarningA Vitest file uses tags, and tags defined in the Vitest config can skip tests or change how they run.

Files the runner refuses to load ​

Some problems make the runner fail while it loads a file:

  • Playwright: test-without-body, tag-without-at, invalid-chain and duplicate-title. Playwright then stops before it runs any test, in this file or any other.
  • Vitest: invalid-chain and removed-api. Vitest reports the file as failed and runs none of its tests; other files still run.

Every test in such a file gets state: "notLoaded", with stateSource: "file" and stateLine at the first of these problems. These tests are counted in notLoadedCount, not in activeCount. Everything else about them is kept, so the records show what the file declares once the problem is fixed. Tests in other files keep their states, even though Playwright runs none of them: the records describe the code, and the diagnostic points at the file to fix.

Only code that runs while the file loads counts. An invalid-chain inside a test, hook or helper body, such as test.step.skip() before Playwright 1.50 or test.slow() in Vitest, runs later and fails only the test that reaches it, so the file loads.

Example ​

json
{
  "code": "unresolved-tag",
  "level": "warning",
  "message": "Tag value TAGS.risk comes from '../../test-data/tags' and could not be worked out; the tag is missing.",
  "relativeFilePath": "tests/orders/limit-orders.spec.ts",
  "lineStart": 16,
  "columnStart": 48,
  "testId": "74099e2f6d05b9ee",
  "source": "TAGS.risk"
}