ErrLookup › vitest-dev/vitest
vitest-dev/vitest
Next generation testing framework powered by Vite. · TypeScript · ★ 16,903
Analyzed at d568f8ce37 on 2026-08-03. 381 documented errors.
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| bitLength is required | exception | error | bigint, validation, example-code, argument-error |
| Negative numbers are not supported | exception | error | bigint, math, validation, example-code, unreachable |
| Cannot take a screenshot without a test path | exception | error | browser, screenshot, playwright, test-context, vitest |
| Element not found: ${v.element} | exception | error | browser, playwright, selectoptions, user-event, dom, vitest |
| The ${provider.name} provider does not support tracing. | exception | error | browser, playwright, tracing, provider, webdriverio, vitest |
| stopChunkTrace cannot be called outside of the test file. | exception | error | browser, tracing, test-context, playwright, vitest |
| The ${context.provider.name} provider does not support traci | exception | error | browser, tracing, provider, playwright, vitest |
| This command can only be called inside a test file. | exception | error | browser, tracing, test-context, playwright, vitest |
| provider ${context.provider.name} is not supported | exception | error | browser, tracing, provider, cleanup, vitest |
| Cannot upload files outside of a test | exception | error | browser, upload, user-event, test-context, playwright, vitest |
| Page "${sessionId}" not found in ${this.browserName} browser | exception | error | browser, playwright, session, lifecycle, vitest |
| [vitest] The provider was closed. | exception | error | browser, playwright, lifecycle, teardown, race, vitest |
| You've enabled headless mode for "preview" provider but it d | exception | error | browser, provider, preview, headless, config, vitest |
| Browser is not initialized | exception | error | browser, provider, preview, lifecycle, init, vitest |
| vitest/browser can be imported only inside the Browser Mode. | exception | error | browser, import, pool, config, virtual-module, vitest |
| Cannot find iframe with id ${event.iframeId} | exception | error | browser, orchestrator, iframe, lifecycle, internal |
| aria adapter expects an Element | exception | error | browser, aria, snapshot, dom, type-error |
| The "preview" provider doesn't support 'userEvent.dragAndDro | exception | error | browser, user-event, preview-provider, drag-and-drop, unsupported |
| Cannot take a screenshot outside of a test. | exception | error | browser, screenshot, lifecycle, test-context |
| Cannot take a screenshot in a concurrent test because concur | exception | error | browser, screenshot, concurrency, iframe |
| Method "getByRole" is not supported by the "${provider}" pro | exception | error | browser, locators, getbyrole, page, unsupported |
| Method "getByLabelText" is not supported by the "${provider} | exception | error | browser, locators, getbylabeltext, page, unsupported |
| Method "getByTestId" is not supported by the "${provider}" p | exception | error | browser, locators, getbytestid, page, unsupported |
| Method "getByAltText" is not supported by the "${provider}" | exception | error | browser, locators, getbyalttext, page, unsupported |
| Method "getByPlaceholder" is not supported by the "${provide | exception | error | browser, locators, getbyplaceholder, page, unsupported |
| Method "getByText" is not supported by the "${provider}" pro | exception | error | browser, locators, getbytext, page, unsupported |
| Method "getByTitle" is not supported by the "${provider}" pr | exception | error | browser, locators, getbytitle, page, unsupported |
| Method "elementLocator" is not supported by the "${provider} | exception | error | browser, locators, elementlocator, page, unsupported |
| Method "frameLocator" is not supported by the "${provider}" | exception | error | browser, locators, framelocator, iframe, unsupported |
| Expecting a valid DOM element, but got ${typeName}. | exception | warning | browser, debug, dom, type-error, prettydom |
| Invalid element or locator: ${elementOrLocator}. Expected an | exception | error | browser, expect, locators, type-error, expect-element |
| .toContainHTML() expects a string value, got ${htmlText} | exception | error | browser, expect, matcher, tocontainhtml, type-error |
| Exact option does not support RegExp expected class names | exception | error | browser, expect, matcher, tohaveclass, regex, exact-option |
| .toHaveDisplayValue() currently supports only input, textare | exception | error | browser, expect, matcher, tohavedisplayvalue, form, dom |
| .toHaveDisplayValue() currently does not support input[type= | exception | error | browser, expect, matcher, tohavedisplayvalue, checkbox, radio, form |
| toHaveFormValues must be called on a form or a fieldset, ins | exception | error | browser, expect-matcher, dom, tohaveformvalues, type-validation |
| toHaveFormValues must be called with an object of expected f | exception | error | browser, expect-matcher, tohaveformvalues, argument-validation, typescript |
| Multiple form elements with the same name must be of the sam | exception | error | browser, expect-matcher, tohaveformvalues, dom, form-validation |
| expected selection must be a string or undefined | exception | error | browser, expect-matcher, tohaveselection, argument-validation |
| input with type=checkbox or type=radio cannot be used with . | exception | error | browser, expect-matcher, tohavevalue, dom, input-type, api-misuse |
| 'toMatchScreenshot' cannot be used with "not" | exception | error | browser, expect-matcher, tomatchscreenshot, visual-regression, api-misuse |
| 'toMatchScreenshot' cannot be used without test context | exception | error | browser, expect-matcher, tomatchscreenshot, test-context, lifecycle |
| received value must ${expectedString} or a Locator that retu | exception | error | browser, expect-matcher, type-validation, dom, locator |
| Locator.filter expects at least one filter. None provided. | exception | error | browser, locator, api-misuse, argument-validation |
| Failed to import test file ${filepath} | exception | error | browser, runner, module-resolution, vite, import, test-file |
| Not called in the browser | exception | error | browser, worker-state, environment, lifecycle, internal-api |
| Expected DOM element to be an instance of Element, received | exception | error | browser, dom, locator, type-validation, tester-utils |
| Cannot find iframe element. This is a bug in Vitest. Please, | exception | error | browser, iframe, internal-api, tester-utils, vitest-bug |
| Expected element or locator to be defined. | exception | error | browser, tester-utils, type-validation, screenshot, locator |
| Expected element or locator to be an instance of Element or | exception | error | browser, tester-utils, type-validation, screenshot, locator, dom |
| Data was not properly initialized. This is a bug in Vitest. | exception | critical | browser, tester, lifecycle, vitest-bug, internal-api |
| Worker state is not found. This is an issue with Vitest. Ple | exception | critical | browser, worker-state, lifecycle, vitest-bug, internal-api |
| No codec found for type ${type} | exception | error | browser, screenshot, codec, image, tomatchscreenshot, configuration |
| Unrecognized comparator ${comparator} | exception | error | browser, screenshot, comparator, tomatchscreenshot, configuration, pixelmatch |
| Cannot compare screenshots without a test path | exception | error | browser, screenshot, browser-command, validation |
| Couldn't write file to fs | exception | error | filesystem, screenshot, permissions, security |
| `resolveOptions` has to be used in a test file | exception | error | screenshot, browser-command, validation, configuration |
| Browser provider is not defined for the project "${child.pro | exception | error | browser-provider, configuration, virtual-module, bug |
| Failed to resolve user-event package from ${previewDistRoot} | exception | error | preview-provider, dependency, user-event, resolution |
| Tester HTML file "${testerHtmlPath}" doesn't exist. | exception | error | configuration, tester, filesystem, browser |
| Invalid command name "${name}". Only alphanumeric characters | exception | error | validation, browser-command, configuration |
| Provider ${this.provider.name} does not support command "${n | exception | error | browser-command, provider, validation |
| Invalid command name "${command}". Only alphanumeric charact | exception | error | validation, configuration, browser-command |
| Cannot spawn child server without a parent dev server. | exception | error | lifecycle, browser, internal, bug |
| Session "${sessionId}" not found. | exception | error | cdp, session, browser, rpc |
| Browser provider is not defined for the project "${browserSe | exception | error | browser-provider, cdp, session, initialization |
| CDP is not supported by the provider "${provider.name}". | exception | error | cdp, browser-provider, webdriverio, validation |
| Tester RPC "${rpcId}" was not established. | exception | error | cdp, rpc, tester, session |
| Access denied to "${path}". See Vite config documentation fo | exception | error | filesystem, security, vite-config, snapshot |
| Cannot use CDP because browser API write or exec operations | exception | error | cdp, security, configuration, api |
| Snapshot file "${id}" does not exist. | exception | error | snapshot, filesystem, cleanup |
| Commands are only available for browser tests. | exception | error | browser-command, webdriverio, validation, project |
| Switch context is only available for WebDriverIO provider. | exception | error | webdriverio, browser-provider, validation |
| ${name}Browser name is required. Please, set `test.browser.i | exception | error | browser-mode, config, playwright |
| Browser Mode requires the "provider" to always be specified. | exception | error | browser-mode, config, provider |
| ${name}Browser "${browser}" is not supported by the browser | exception | error | browser-mode, config, playwright, webdriverio |
| The "${name}" browser provider does not provide a "providerF | validation | error | browser-mode, provider, version-mismatch, typescript |
| Access denied to "${path}". See Vite config documentation fo | exception | error | browser-mode, filesystem, vite, security, config |
| Cannot modify file "${path}". File writing is disabled becau | exception | error | browser-mode, filesystem, security, api, config |
| Something removed the coverage directory "${coverageFilesDir | exception | error | coverage, istanbul, filesystem, concurrency |
| Something removed the coverage directory "${coverageFilesDir | exception | error | coverage, v8, filesystem, concurrency |
| V8 provider missing inspector session. | exception | error | coverage, v8, inspector, lifecycle |
| You must provide an array or set to ${matcherHint('.toBeOneO | validation | error | expect, matcher, assertion, typescript |
| Expected is not a string | validation | error | expect, asymmetric-matcher, assertion, typescript |
| You must provide an object to ${this.toString()}, not '${typ | validation | error | expect, asymmetric-matcher, assertion, typescript |
| You must provide an array to ${this.toString()}, not '${type | validation | error | expect, asymmetric-matcher, assertion, typescript |
| any() expects to be passed a constructor function. Please pa | validation | error | expect, asymmetric-matcher, assertion, typescript |
| Expected is not a String or a RegExp | validation | error | expect, asymmetric-matcher, assertion, typescript |
| Expected is not a Number | validation | error | expect, asymmetric-matcher, assertion, typescript |
| Precision is not a Number | validation | error | expect, asymmetric-matcher, assertion, typescript |
| SchemaMatching expected to receive a Standard Schema. | validation | error | expect, asymmetric-matcher, standard-schema, validation, typescript |
| Async schema validation is not supported in asymmetric match | exception | error | expect, asymmetric-matcher, standard-schema, async, validation |
| expected promise to throw an error, but it didn't | exception | error | assertion, async, promise, tothrow, resolves |
| ${msg} (${stripped} matching ${stripped === 1 ? 'property' : | exception | error | assertion, tomatchobject, diff, subset-equality |
| .toMatch() expects to receive a string, but got ${typeof act | validation | error | typeerror, tomatch, string, type-mismatch |
| toContain() expected a DOM node as the argument, but got ${t | validation | error | typeerror, tocontain, dom, node, type-mismatch |
| ${utils.inspect(assertion._obj)} is not a spy or a call to a | validation | error | typeerror, mock, spy, tohavebeencalled, type-mismatch |
| ${msg} | exception | error | assertion, mock, spy, tohavebeencalled |
| ${formatCalls(spy, msg, args)} | exception | error | assertion, mock, spy, tohavebeencalledwith, diff |
| ${utils.inspect(resultSpy)} is not a spy or a call to a spy | validation | error | typeerror, mock, spy, tohavebeencalledbefore, type-mismatch |
| expected function to throw an error, but it didn't | exception | error | assertion, tothrow, function, no-throw |
| ${formatReturns(spy, results, msg, value)} | exception | error | assertion, mock, spy, tohavereturnedwith, tohaveresolvedwith, diff |
| You must provide a Promise to expect() when using .resolves, | validation | error | typeerror, resolves, promise, type-mismatch, async |
| You must provide a Promise to expect() when using .rejects, | validation | error | typeerror, rejects, promise, type-mismatch, async |
| expect.soft() can only be used inside a test | exception | error | expect, soft-assertion, test-scope, lifecycle-hooks |
| [@vitest/mocker] `createMockInstance` is not defined. This i | exception | error | automocker, internal, mock-instance, version-mismatch |
| Vitest mocker was not initialized in this environment. vi.${ | exception | error | mocker, environment, initialization, globalthis |
| vi.hoisted() expects a function, but received a ${typeof fac | validation | error | vi-hoisted, type-validation, typeerror |
| vi.mock() expects a string path, but received a ${typeof pat | validation | error | vi-mock, type-validation, typeerror, module-path |
| vi.unmock() expects a string path, but received a ${typeof p | validation | error | vi-unmock, type-validation, typeerror, module-path |
| vi.doMock() expects a string path, but received a ${typeof p | validation | error | vi-domock, type-validation, typeerror, module-path |
| vi.doUnmock() expects a string path, but received a ${typeof | validation | error | vi-dounmock, type-validation, typeerror, module-path |
| Unknown mock type: ${(mock as any).type} | exception | error | msw, interceptor, internal, browser-mocking |
| Mock ${id} wasn't registered. This is probably a Vitest erro | exception | error | registry, internal, manual-mock, factory |
| Mock ${id} wasn't resolved. This is probably a Vitest error. | exception | error | registry, internal, manual-mock, resolve |
| [vitest] Cannot resolve "${id}" imported from "${importer}" | exception | error | resolution, import-actual, vite-resolve, module-path |
| failed to parse ${options.id} | exception | error | parser, automock, syntax-error, transform |
| automocking files with `export *` is not supported because i | exception | error | automock, export-star, barrel, static-analysis |
| unknown source type while automocking: ${source} | validation | error | automock, ast, internal, typeerror |
| AssignmentPattern is not supported. Please open a new bug re | exception | error | automock, ast, destructuring, assignment-pattern |
| MemberExpression is not supported. Please open a new bug rep | exception | error | automock, ast, destructuring, member-expression |
| There are some problems in resolving the mocks API. You may | exception | error | hoist-mocks, globals, import-source, mock-api |
| ${hoistedNodes.size} call${plural ? 's' : ''} in "${relative | exception | error | hoist-mocks, top-level-scope, vi-mock, vi-domock |
| Cannot parse '${filename}' because "module.stripTypeScriptTy | exception | error | node-version, mocking, typescript, automock |
| Cannot parse the module format of '${url}' because "module.f | exception | error | node-version, mocking, esm, cjs |
| [vitest] Cannot register a mock that is already defined. Exp | validation | error | mocking, registry, serialization, ipc |
| Cannot set serialized manual mock. Define a factory function | exception | error | mocking, registry, serialization, manual-mock |
| Unknown mock type: ${(event as any).type} | exception | error | mocking, registry, validation, serialization |
| [vitest] Mocks require a raw string. | validation | error | mocking, registry, validation |
| [vitest] Mocks require a url string. | validation | error | mocking, registry, validation |
| [vitest] Mocks require an id string. | validation | error | mocking, registry, validation |
| [vitest] Manual mocks require a factory function. | validation | error | mocking, registry, validation, manual-mock |
| [vitest] Redirect mocks require a redirect string. | validation | error | mocking, registry, validation, redirect |
| [vitest] Unknown mock type: ${type} | exception | error | mocking, registry, validation |
| [vitest] vi.mock("${raw}", factory?: () => unknown) is not r | validation | error | mocking, vi-mock, validation, manual-mock |
| ${error.message} | exception | error | pretty-format, plugins, snapshot, serialization |
| pretty-format: Plugin must return type "string" but instead | validation | error | pretty-format, plugins, validation, serialization |
| pretty-format: Unknown option "${key}". | validation | error | pretty-format, options, validation |
| pretty-format: Options "min" and "indent" cannot be used tog | validation | error | pretty-format, options, validation |
| pretty-format: Option "theme" has a key "${key}" whose value | exception | error | pretty-format, theme, dependency, highlight |
| Asymmetric matcher ${val.constructor.name} does not implemen | exception | error | pretty-format, asymmetric-matcher, expect, plugins |
| The snapshot state for '${filepath}' is not found. Did you c | exception | error | snapshot, snapshot-client, lifecycle, validation |
| Snapshot cannot be used outside of test | exception | error | snapshot, test-context, configuration |
| Received value must be an object when the matcher has proper | exception | error | snapshot, assertion, type-mismatch |
| Raw snapshot is required | exception | error | snapshot, raw-snapshot, api-misuse |
| cannot read ${file} when saving inline snapshot | exception | error | snapshot, inline-snapshot, filesystem |
| @vitest/snapshot: Couldn't infer stack frame for inline snap | exception | error | snapshot, inline-snapshot, stack-trace, source-maps |
| Snapshot keys must end with a number. | exception | error | snapshot, snapshot-file, corruption |
| Cannot spy on export "${String(key)}". Module namespace is n | exception | error | spy, mocking, esm, module-namespace |
| Cannot use `${shorthand}` when called with `new`. Use `mockI | exception | error | spy, mock, constructor, api-misuse |
| value of unknown type: ${value} | exception | error | utils, type-detection, defensive, unreachable |
| ${name} value must be ${types.join(' or ')}, received "${rec | exception | error | utils, validation, type-mismatch, configuration |
| offset is longer than source length! offset ${offset} > leng | exception | error | utils, offset, source-maps, cache |
| vitest/browser can be imported only inside the Browser Mode. | exception | error | browser, configuration, pool, include-glob |
| Test file "${id}" was not registered, so it cannot be update | exception | warning | api, websocket, ui, file-registration |
| Unsupported framework: ${framework} | exception | error | browser, scaffolding, init, framework |
| ${matcherHint('.toBeFasterThan')} expects the actual value t | exception | error | benchmark, matcher, type-mismatch |
| ${matcherHint('.toBeFasterThan')} expects the expected value | exception | error | benchmark, matcher, type-mismatch |
| ${matcherHint('.toBeSlowerThan')} expects the actual value t | exception | error | benchmark, matcher, type-mismatch |
| ${matcherHint('.toBeSlowerThan')} expects the expected value | exception | error | bench, matcher, type-error, assertion |
| expect.poll() must be called inside a test | exception | error | expect, poll, test-context, async |
| expect.poll() is not supported in combination with .${key}() | exception | error | expect, poll, snapshot, syntax, matcher |
| Environment "${name}" is not a valid environment. Path "${pa | exception | error | environment, config, custom-environment, loader |
| Environment "${name}" is not a valid environment. Path "${pa | exception | error | environment, config, custom-environment, validation |
| ${utils.inspect(chain)} is not a `vi.when` instance | exception | error | mock, vi-when, matcher, type-error |
| process.nextTick cannot be mocked inside child_process | exception | error | timers, fake-timers, forks-pool, nexttick, config |
| A function to advance timers was called but the timers APIs | exception | error | timers, fake-timers, setup, assertion |
| vi.when: the argument must be a mock function created with ` | exception | error | mock, vi-when, spy, type-error |
| vi.when: no behavior defined when called with [${args.map(ar | exception | error | mock, vi-when, strict-mode, matcher |
| vi.when: `times` option must be greater than 0 | exception | error | mock, vi-when, range-error, validation |
| expected must be a function, received ${typeof expected} | exception | error | snapshot, matcher, throw, assertion |
| snapshot function didn't throw | exception | error | snapshot, matcher, throw, assertion |
| '${getAssertionName(obj)}' cannot be used without test conte | exception | error | snapshot, test-context, matcher, assertion |
| '${getAssertionName(obj)}' cannot be used with 'test.fails' | exception | error | snapshot, test-fails, syntax, matcher |
| ${getAssertionName(assertion)} cannot be used with "not" | exception | error | snapshot, negation, syntax, matcher |
| Snapshot environment module must have a default export objec | exception | error | snapshot, config, custom-environment, loader |
| vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported | exception | error | timers, fake-timers, forks-pool, nexttick, config |
| vi.mock() expects a string path, but received a ${typeof pat | exception | error | mock, vi-mock, type-error, validation |
| vi.unmock() expects a string path, but received a ${typeof p | exception | error | mock, vi-mock, type-error, validation |
| vi.doMock() expects a string path, but received a ${typeof p | exception | error | |
| vi.doUnmock() expects a string path, but received a ${typeof | exception | error | |
| Vitest mocker was not initialized in this environment. vi.${ | exception | error | |
| Benchmark artifact path "${relativePath}" resolves outside t | exception | error | |
| Expected a single value for option "${command}", received [$ | exception | error | |
| Expected "vitest" as the first argument, received "${arrayAr | exception | error | |
| Unexpected value "--silent=${value}". Use "--silent=true ${v | exception | error | |
| --cache.dir is deprecated | exception | error | |
| Unexpected value for --expect.poll: ${value}. If you need to | exception | error | |
| Unexpected value for --expect: ${value}. If you need to conf | exception | error | |
VITEST_RANGE_LOCATION_FILTER_PROVIDED Found "-" in location filter ${filter}. Note that range location filters are no | exception | error | |
| Failed to create Vitest API token at ${tokenPaths.join(' or | exception | error | |
| Inspector host cannot be a URL. Use "host:port" instead of " | exception | error | |
| Root path does not exist or is not a directory: ${resolved.r | exception | error | |
| The `test.workspace` option was removed in Vitest 4. Please, | exception | error | |
| Each tag defined in "test.tags" must have a "name" property, | exception | error | |
| Tag name "${tag.name}" is already defined in "test.tags". Ta | exception | error | |
| Tag name "${tag.name}" is invalid. Tag names cannot contain | exception | error | |
| Tag name "${tag.name}" is invalid. Tag names cannot contain | exception | error | |
| Tag name "${tag.name}" is invalid. Tag names cannot be a log | exception | error | |
| Tag "${tag.name}": retry.condition function cannot be used i | exception | error | config, tags, retry, serialization, worker-threads |
| Tag "${tag.name}": priority must be a non-negative number. | exception | error | config, tags, priority, validation |
| Looks like you set "test.environment" to "browser". To enabl | exception | error | config, browser, environment, migration |
| You cannot use --shard option with enabled watch | exception | error | cli, shard, watch, ci |
| --shard <count> must be a positive number | exception | error | cli, shard, validation, ci |
| --shard <index> must be a positive number less then <count> | exception | error | cli, shard, validation, ci |
| Vitest standalone mode requires --watch | exception | error | cli, standalone, watch, editor-integration |
| Cannot merge reports with --watch enabled | exception | error | cli, merge-reports, watch, ci |
| You cannot use ${inspectOption} without "--no-file-paralleli | exception | error | cli, inspect, debugging, parallelism, worker-threads |
| All browser instances within a project must use the same pro | validation | error | config, browser, provider, workspace, multi-project |
| "browser.instances" was set in the config, but the array is | validation | error | cli, browser, instances, filter, config |
| "Istanbul" coverage provider is not compatible with "experim | validation | error | config, coverage, istanbul, v8, experimental |
| You cannot set "coverage.reportsDirectory" as ${reportsDirec | validation | error | config, coverage, filesystem, safety |
| "snapshotFormat.compareKeys" function is not supported. | validation | error | config, snapshot, serialization, worker-threads |
| The `browser.provider` configuration was changed to accept a | validation | error | config, browser, provider, migration, breaking-change |
| stackblitz environment does not support the ${resolved.brows | validation | error | browser, provider, stackblitz, environment, sandbox |
| Vitest received --browser flag, but no project had a browser | validation | error | cli, browser, workspace, config |
| No projects matched the filter "${filter}". | validation | error | cli, workspace, project-filter, config |
| Vitest wasn't able to resolve any project.${resolved.browser | validation | error | workspace, project-resolution, browser, config, startup |
| Unknown value for "test.listTags": ${listTags} | validation | error | config, tags, listtags, validation |
| Root project is not initialized. This means that the Vite se | exception | error | api-misuse, initialization, lifecycle, vite-server |
| Project "${name}" was not found. | exception | error | api-misuse, projects, initialization |
| Cannot merge reports when `--reporter=blob` is used. Remove | validation | error | reporters, blob, merge, config |
VITEST_FILES_NOT_FOUND No test files found | exception | error | glob, discovery, config, files |
| Task ${id} was not found | exception | error | watch, tasks, internal, state |
| Test specification for task ${id} was not found | exception | error | watch, tasks, internal, state |
| BaseReporter's createCoverageMap was not overwritten | exception | error | coverage, reporters, extensibility, abstract |
| BaseReporter's generateReports was not overwritten | exception | error | coverage, reporters, extensibility, abstract |
| BaseReporter's parseConfigModule was not overwritten | exception | error | coverage, reporters, thresholds, autoupdate, extensibility |
| Expected string coverage payload, received ${typeof coverage | exception | error | coverage, blob, ipc, worker |
| Missing configurationFile. The "coverage.thresholds.autoUpda | validation | error | coverage, thresholds, autoupdate, config |
| Cannot parse '${url}' because "module.stripTypeScriptTypes" | validation | error | coverage, typescript, node-version, environment |
| Expected config.test.coverage.thresholds to be an object | validation | error | coverage, thresholds, config, validation |
| Unable to parse thresholds from configuration file: ${messag | validation | error | coverage, thresholds, config, autoupdate |
| ${error instanceof Error ? error.message : String(error)} | exception | error | coverage, config, thresholds, autoupdate, magicast |
| Failed to update coverage thresholds. Configuration file is | validation | error | coverage, config, thresholds, autoupdate, magicast |
| Vitest Module Runner doesn't support Vite HMR events. | exception | error | hmr, runner, vite, internal |
| invalid export in globalSetup file ${file}: ${exp} must be a | validation | error | globalsetup, config, validation |
| invalid globalSetup file ${file}. Must export setup, teardow | validation | error | globalsetup, config, validation |
| Browser Mode was enabled, but provider was not specified any | validation | error | browser, config, provider |
| --shard <count> must be a smaller than count of test files. | validation | error | sharding, config, cli |
| Cannot find the environment. This is a bug in Vitest. | exception | error | internal-bug, environment, assertion |
| Errors occurred while running tests. For more information, s | exception | error | aggregate, worker, test-runner |
| Projects "${last}" and "${spec.project.name}" have different | validation | error | config, workspace, scheduling, maxworkers |
| The browser server was not initialized${project.name ? ` for | exception | error | browser, internal-bug, provider, assertion |
| Orchestrator not found for session ${sessionId}. This is a b | exception | error | browser, internal-bug, orchestrator, session, assertion |
| Unexpected empty queue | exception | error | browser, internal-bug, state-machine, assertion |
| Unable to set breakpoint, CDP not supported | exception | error | browser, debugger, cdp, inspector, config |
| [vitest-pool]: Cannot run tasks while pool is cancelling | exception | error | pool, cancellation, concurrency, scheduling |
| Runner ${task.worker} is not supported. Test files: ${format | exception | error | pool, config, custom-runner |
| Cannot set concurrency id because there are no valid free id | exception | error | pool, internal-bug, scheduling, concurrency, assertion |
| Isolated tasks should not share runners | exception | error | pool, internal-bug, isolation, runner-reuse, assertion |
| [vitest-pool-runner]: Cannot start a stopped runner | exception | error | pool-runner, internal-bug, lifecycle, experimental-api, assertion |
| The environment ${environmentName} was not defined in the Vi | validation | error | rpc, environment, vite, config |
| The VM environment was not defined in the Vite config. This | exception | error | rpc, internal-bug, environment, transform, assertion |
| The child process was torn down or never initialized. This i | exception | error | worker, forks, internal-bug, lifecycle, assertion |
| The worker thread was torn down or never initialized. This i | exception | error | worker, threads, internal-bug, lifecycle, assertion |
| Unexpected message ${JSON.stringify(message, null, 2)} | exception | error | typecheck, worker, internal-bug, rpc-protocol, assertion |
| Cannot provide "${key}" because it's not serializable. | validation | error | serialization, provide, worker, structured-clone, test-context |
| invalid return value in globalSetup file ${globalSetupFile.f | validation | error | global-setup, teardown, lifecycle, configuration |
| browser is not initialized | exception | error | browser, initialization, provider, internal |
| Can't find browser origin URL for project "${this.name}" | exception | error | browser, vite-server, network, port, url |
| Project name "${name}" is not unique. All projects should ha | validation | error | projects, naming, inject, duplicate, configuration |
| Project name "${name}"${entryFile ? ` from "${entryFile}"` : | validation | error | projects, naming, duplicate, configuration, monorepo |
| No projects were found. Make sure your configuration is corr | validation | error | projects, filter, cli, configuration, empty-results |
| Failed to initialize projects. There were errors during proj | exception | error | projects, aggregate-error, configuration, initialization, diagnostics |
| Found a circular "projects" definition: ${[...chain, realCon | validation | error | projects, circular, configuration, container, recursion |
| No projects were found in "${relativeFile}". Make sure your | validation | error | projects, container, empty-results, configuration |
| The browser configuration must have a "browser" property. Th | validation | error | browser, instances, configuration, validation |
| The browser configuration must have a "name" property. This | exception | error | browser, instances, internal-bug, naming |
| The instance cannot have a different provider from its paren | validation | error | browser, provider, instances, configuration |
| @vitest/coverage-v8 does not work with ${browserConfig} Use | validation | error | coverage, v8, browser, chromium, configuration |
| ${inspectOption} does not work with ${browserConfig} Use ei | validation | error | debugging, inspect, browser, chromium, configuration |
| Cannot define a nested project for a ${browser} browser. The | validation | error | browser, instances, naming, duplicate, configuration |
| Cannot create a benchmark project because the name "${name}" | validation | error | benchmark, naming, duplicate, configuration |
| Projects definition references a non-existing file or a dire | validation | error | projects, filesystem, path, configuration |
| The file "${relative(parentConfig.root, file)}" must start w | validation | error | projects, config-file, naming, configuration, validation |
| Unexpected file type: ${file} | exception | error | projects, filesystem, unexpected, internal, edge-case |
| The projects glob matched a file "${relative(parentConfig.ro | validation | error | config, projects, glob, monorepo |
| Blob reporter is not supported in watch mode | validation | error | reporter, blob, watch, config |
| vitest.mergeReports() expects all paths in "${blobsDirectory | validation | error | reporter, blob, merge-reports, filesystem |
| vitest.mergeReports() expects all paths in "${blobsDirectory | validation | error | reporter, blob, merge-reports, validation |
| vitest.mergeReports() requires at least one blob file in "${ | validation | error | reporter, blob, merge-reports, empty-state |
| vitest.mergeReports() requires all blob files to be generate | validation | error | reporter, blob, merge-reports, version-mismatch, ci |
| the blobs in "${blobsDirectory}" were generated by a differe | validation | error | reporter, blob, merge-reports, version-mismatch |
| Task instance was not found for ${runnerTask.type} "${runner | exception | error | reporter, internal, tasks, invariant |
| Unknown suite state: ${state} | exception | error | reporter, internal, tasks, invariant |
| Failed to load custom Reporter from ${path} | exception | error | reporter, custom-reporter, import, config |
| Custom reporter loaded from ${path} was not the default expo | exception | error | reporter, custom-reporter, default-export, config |
VITEST_INCLUDE_TASK_LOCATION_DISABLED Received line number filters while `includeTaskLocation` option is disabled | exception | error | config, filters, location, cli |
VITEST_LOCATION_FILTER_FILE_NOT_FOUND Couldn't find file ${filename}. Note when specifying the test location you have | exception | error | filters, location, cli, filesystem |
VITEST_GIT_NOT_FOUND Could not find Git root. Have you initialized git with `git init`? | exception | error | vcs, git, changed-files, environment |
| The vcsProvider module '${vcsProvider}' doesn't have a defau | exception | error | vcs, custom-provider, default-export, config |
| Failed to load benchmark provider from "${provider}". | exception | error | benchmark, custom-provider, import, config |
| Benchmark provider loaded from "${provider}" did not have a | exception | error | benchmark, custom-provider, default-export, config |
| `bench.from()` could not find a result file at "${resolved}" | exception | error | benchmark, bench-from, baseline, filesystem |
| task "${name}" was not defined | exception | error | benchmark, bench-compare, validation, api-usage |
| benchmark provider did not return a result for "${name}" | exception | error | benchmark, custom-provider, validation, api-contract |
| `bench.from()` requires a name (string or named function) as | exception | error | benchmark, bench-from, api-misuse, validation, typeerror |
| `bench.from()` expects a string path or a function returning | exception | error | benchmark, bench-from, api-misuse, validation, typeerror |
| `bench.compare()` requires at least 2 benchmarks, received $ | exception | error | benchmark, bench-compare, validation, arity, syntaxerror |
| `bench.compare()` expects every argument to be the return va | exception | error | benchmark, bench-compare, api-misuse, validation, syntaxerror |
| `bench()` does not accept options as the third argument. Pas | exception | error | benchmark, bench, api-misuse, argument-order, typeerror |
| `bench()` expects a benchmark function. Call `bench(name, fn | exception | error | benchmark, bench, api-misuse, missing-argument, typeerror |
| Cannot use the `bench` test-context fixture within a regular | exception | error | benchmark, configuration, project-setup, context-fixture |
| Some benchmarks failed | exception | error | benchmark, runtime, aggregate-error, tinybench |
| task "${task.name}" did not complete: received "${result.sta | exception | error | benchmark, runtime, defensive, abort, tinybench |
| importActual is not implemented | exception | error | mocking, import-actual, environment, browser, not-implemented |
| importMock is not implemented | exception | error | mocking, import-mock, environment, browser, not-implemented |
| require() is not supported in virtual modules. Trying to cal | exception | error | mocking, virtual-module, commonjs, require, esm, syntaxerror |
| createNodeImportMeta is not supported in this version of Vit | exception | critical | version-compatibility, vite, module-runner, configuration |
| Cannot automock '${url}' because it failed to parse. | exception | error | mocking, automock, parsing, acorn, typescript, native-mocker |
| Failed to mock '${url}'. See the cause for more information. | exception | error | mocking, manual-mock, parsing, native-mocker |
| Mock ${id} wasn't registered. This is probably a Vitest erro | exception | error | mocking, native-mocker, internal, bug-report, hoisting |
| Cannot parse '${filename}' because "module.stripTypeScriptTy | exception | error | mocking, typescript, node-version, configuration, native-mocker |
| Test runner doesn't support test artifacts. | exception | error | artifacts, runner, experimental, record-artifact |
| Test attachment requires "body" or "path" to be set. Both ar | exception | error | artifacts, attachment, validation, typeerror |
| Test attachment requires only one of "body" or "path" to be | exception | error | artifacts, attachment, validation, typeerror |
| Test attachment with "path" should not have "bodyEncoding" s | exception | error | attachment, validation, artifact, recordartifact |
| done() callback is deprecated, use promise instead | exception | error | deprecated, test-context, done-callback, migration |
| Cannot annotate tests outside of the test run. The test "${t | exception | error | annotation, lifecycle, async, test-context |
| Test runner doesn't support test annotations. | exception | error | annotation, custom-runner, runner-capability |
| Cannot resolve user fixtures. See errors for more informatio | exception | error | fixtures, aggregate-error, validation, extend |
| Circular fixture dependency detected: ${fixture.name} <- ${[ | exception | error | fixtures, circular-dependency, dependency-graph |
| Hook ${name}() can only be called inside a test | exception | error | hooks, lifecycle, ontestfailed, ontestfinished, test-context |
| Cannot call "onTestFailed" inside a test hook. | exception | error | hooks, ontestfailed, lifecycle, test-context |
| Cannot call "onTestFinished" inside a test hook. | exception | error | hooks, ontestfinished, lifecycle, test-context |
| The `${callbackName}` callback was called multiple times in | exception | error | hooks, aroundeach, aroundall, lifecycle |
| The `${callbackName}` callback was not called in the `${hook | exception | error | hooks, aroundeach, aroundall, lifecycle |
| Test function is not found. Did you add it using `setFn`? | exception | error | runner, setfn, internal, task-execution |
| Calling the test function inside another test function is no | exception | error | test-definition, nesting, collection, lifecycle |
| Vitest failed to find ${message}. One of the following is po | exception | critical | initialization, config, globalsetup, context, internal |
| Signature "test(name, fn, { ... })" was deprecated in Vitest | exception | error | deprecation, migration, vitest-4, signature, breaking-change |
| Cannot use two functions as arguments. Please use the second | exception | error | signature, validation, test-definition, argument-error |
| File is required to collect tasks. | exception | error | collection, internal, file, validation |
| Calling the suite function inside test function is not allow | exception | error | suite-definition, nesting, collection, lifecycle |
| onCleanup can only be called once per fixture. Define separa | exception | error | fixtures, builder-pattern, oncleanup, extend |
| The Vitest config does't define any "tags", cannot apply "${ | exception | error | tags, config, stricttags, validation |
| The ${prefix} "${tag}" is not defined in the configuration. | exception | error | config, tags, validation |
| Invalid tags expression: unexpected "${formatToken(stream.pe | exception | error | tags, filter-expression, parser |
| Invalid tags expression: missing closing ")" in "${this.expr | exception | error | tags, filter-expression, parser |
| Invalid tags expression: expected "${formatTokenType(type)}" | exception | error | tags, filter-expression, parser |
| Invalid tags expression: unexpected end of expression in "${ | exception | error | tags, filter-expression, parser |
| Invalid tags expression: unexpected "${formatToken(token)}" | exception | error | tags, filter-expression, parser |
| Runner must export a default function, but got ${typeof mod. | exception | error | config, runner, esm |
| Runner must implement "importFile" method. | exception | error | config, runner, validation |
| invalid diff config file ${config.diff}. Must have a default | exception | error | config, diff, esm |
| invalid snapshot serializer file ${file}. Must export a defa | exception | error | config, snapshot, serializer, esm |
| invalid snapshot serializer in ${file}. Must have a 'test' m | exception | error | config, snapshot, serializer, validation |
| Vitest failed to access its internal state. One of the foll | exception | error | runtime, config, worker-state |
| [vitest] "register" is not available when running in Vitest. | exception | error | vm, module-system, cjs, loader |
| [vitest] "registerHooks" is not available when running in Vi | exception | error | vm, module-system, cjs, loader |
| import of '${fileUrl}' by undefined is not supported: http c | exception | error | network, security, esm, vm |
| Invalid data URI | exception | error | data-uri, esm, vm |
| Missing data URI encoding | exception | error | data-uri, wasm, esm, vm |
| Invalid data URI encoding: ${encoding} | exception | error | data-uri, wasm, esm, vm |
| Expected IP address, received ${address} | exception | error | network, security, esm, vm |
| [vitest] Failed to transform ${fileUrl}. Does the file exist | exception | error | vm-pool, vite, module-resolution, transform |
| Test worker should expose "runTests" method. Received "${typ | exception | error | custom-pool, worker, api-contract, experimental |
| process.exit unexpectedly called with "${code}" | exception | error | process-exit, isolation, base-pool, test-code |
| Failed to load custom "defines": ${error.message} | exception | error | define, config, base-pool, vm-eval |
| Expected worker to be run in node:child_process | exception | critical | forks-pool, worker, child-process, import-guard |
| Expected worker to be run in node:worker_threads | exception | critical | threads-pool, worker, worker-threads, import-guard |
| Environment "${ctx.environment.name}" is not a valid environ | exception | error | vm-pool, environment, setupvm, custom-environment |
| Environment ${environment.name} doesn't provide "getVmContex | exception | error | vm-pool, environment, getvmcontext, setupvm |
| Environment ${environment.name} doesn't provide a valid cont | exception | error | vm-pool, environment, vm-context, validation |
| process.exit unexpectedly called with "${code}" | exception | error | vm-pool, process-exit, isolation, test-code |
| Failed to load custom "defines": ${error.message} | exception | error | vm-pool, define, config, vm-eval |
| Pool "${context.pool}" cannot run with "experimental.viteMod | exception | error | vm-pool, config, vite-module-runner, incompatible-flags |
| TypeScript compiler returned help text instead of type check | exception | error | typecheck, typescript, tsconfig, config |
| Failed to load ${CoverageProviderMap[provider]}. Default exp | exception | error | coverage, v8, istanbul, dependency-version |
| Failed to load custom CoverageProviderModule from ${options. | exception | error | coverage, custom-provider, module-load, config |
| Custom CoverageProviderModule loaded from ${options.customPr | exception | error | coverage, custom-provider, default-export, config |
| Cannot find environment for ${testFilePath} | exception | error | module-graph, environment, vite, browser |
| For a percentage based memory limit a percentageReference mu | exception | error | memory-limit, config, percentage, validation |
| Unexpected numerical input for "memoryLimit" | exception | error | memory-limit, config, validation, numeric |
| "@opentelemetry/api" is not installed locally. Make sure you | exception | error | opentelemetry, tracing, missing-dependency, config |
| Failed to import custom OpenTelemetry SDK script (${options. | exception | error | opentelemetry, tracing, config, esm, dynamic-import |
| [vitest] `importScripts` is not supported in Vite workers. P | exception | error | web-worker, esm, importscripts, module-runner |
| [@vitest/web-worker] Cannot initiate a custom Web Worker. "$ | exception | error | web-worker, environment, jsdom, happy-dom, setup |
| "postMessage" requires at least one argument. | exception | error | web-worker, postmessage, worker-side, validation |
| Vitest cannot be imported in a CommonJS module using require | exception | error | esm, commonjs, require, bundler, package-exports |