Compared with 4.1.12: `TestRunnerConfig`, `TestAPI.scoped`, `it.scoped`, `Assertion.toBeCalledTimes`, `Assertion.toBeCalled`, and 332 more. 8 newly deprecated.
vitest 4.1.12 → 5.0.5: deprecates 337 API(s): from its source to your code
Assertion.toBeCalledTimes: Ensures that a mock function is called an exact number of times. Alias for `expect.toHaveBeenCalledTimes`. Use `toHaveBeenCalledTimes` instead
Assertion.toBeCalled: Ensures that a mock function is called. Alias for `expect.toHaveBeenCalled`. Use `toHaveBeenCalled` instead
Assertion.toBeCalledWith: Ensure that a mock function is called with specific arguments. Alias for `expect.toHaveBeenCalledWith`. Use `toHaveBeenCalledWith` instead
Assertion.toThrowError: Used to test that a function throws when it is called. Alias for `expect.toThrow`. Use `toThrow` instead
Assertion.toReturn: Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time Alias for `expect.toHaveReturned`. Use `toHaveReturned` instead
Assertion.toReturnTimes: Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. Any calls to the mock function that throw an error are not counted toward the number of times the function returned. Alias for `expect.toHaveReturnedTimes`. Use `toHaveReturnedTimes` instead
Assertion.toReturnWith: Use to ensure that a mock function returned a specific value. Alias for `expect.toHaveReturnedWith`. Use `toHaveReturnedWith` instead
JestAssertion.toBeCalledTimes: Ensures that a mock function is called an exact number of times. Alias for `expect.toHaveBeenCalledTimes`. Use `toHaveBeenCalledTimes` instead
JestAssertion.toBeCalled: Ensures that a mock function is called. Alias for `expect.toHaveBeenCalled`. Use `toHaveBeenCalled` instead
JestAssertion.toBeCalledWith: Ensure that a mock function is called with specific arguments. Alias for `expect.toHaveBeenCalledWith`. Use `toHaveBeenCalledWith` instead
JestAssertion.toThrowError: Used to test that a function throws when it is called. Alias for `expect.toThrow`. Use `toThrow` instead
JestAssertion.toReturn: Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time Alias for `expect.toHaveReturned`. Use `toHaveReturned` instead
JestAssertion.toReturnTimes: Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. Any calls to the mock function that throw an error are not counted toward the number of times the function returned. Alias for `expect.toHaveReturnedTimes`. Use `toHaveReturnedTimes` instead
JestAssertion.toReturnWith: Use to ensure that a mock function returned a specific value. Alias for `expect.toHaveReturnedWith`. Use `toHaveReturnedWith` instead
MatcherState.dontThrow: exists only in types
MatcherState.error: exists only in types
MatcherState.expand: exists only in types
MatcherState.suppressedErrors: exists only in types
WebSocketHandlers.getResolvedProjectLabels: Use `getConfig().projects` instead.
SuiteCollector.test.scoped: Use `test.override()` instead
WorkerGlobalState.environment.transformMode: use `viteEnvironment` instead. Uses `name` by default
Assertion.resolves.toBeCalledTimes: Ensures that a mock function is called an exact number of times. Alias for `expect.toHaveBeenCalledTimes`. Use `toHaveBeenCalledTimes` instead
Assertion.resolves.toBeCalled: Ensures that a mock function is called. Alias for `expect.toHaveBeenCalled`. Use `toHaveBeenCalled` instead
Assertion.resolves.toBeCalledWith: Ensure that a mock function is called with specific arguments. Alias for `expect.toHaveBeenCalledWith`. Use `toHaveBeenCalledWith` instead
Assertion.resolves.toThrowError: Used to test that a function throws when it is called. Alias for `expect.toThrow`. Use `toThrow` instead
Assertion.resolves.toReturn: Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time Alias for `expect.toHaveReturned`. Use `toHaveReturned` instead
Assertion.resolves.toReturnTimes: Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. Any calls to the mock function that throw an error are not counted toward the number of times the function returned. Alias for `expect.toHaveReturnedTimes`. Use `toHaveReturnedTimes` instead
Assertion.resolves.toReturnWith: Use to ensure that a mock function returned a specific value. Alias for `expect.toHaveReturnedWith`. Use `toHaveReturnedWith` instead
Assertion.called.toBeCalledTimes: Ensures that a mock function is called an exact number of times. Alias for `expect.toHaveBeenCalledTimes`. Use `toHaveBeenCalledTimes` instead
Assertion.called.toBeCalled: Ensures that a mock function is called. Alias for `expect.toHaveBeenCalled`. Use `toHaveBeenCalled` instead
Assertion.called.toBeCalledWith: Ensure that a mock function is called with specific arguments. Alias for `expect.toHaveBeenCalledWith`. Use `toHaveBeenCalledWith` instead
Assertion.called.toThrowError: Used to test that a function throws when it is called. Alias for `expect.toThrow`. Use `toThrow` instead
Assertion.called.toReturn: Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time Alias for `expect.toHaveReturned`. Use `toHaveReturned` instead
Assertion.called.toReturnTimes: Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. Any calls to the mock function that throw an error are not counted toward the number of times the function returned. Alias for `expect.toHaveReturnedTimes`. Use `toHaveReturnedTimes` instead
Assertion.called.toReturnWith: Use to ensure that a mock function returned a specific value. Alias for `expect.toHaveReturnedWith`. Use `toHaveReturnedWith` instead
node:parseAst: - use `parseSync` instead
node:parseAstAsync: - use `parse` instead
node:BaseCoverageOptions: Use `CoverageOptions` instead
node:CoverageIstanbulOptions: Use `CoverageOptions` instead
node:CoverageV8Options: Use `CoverageOptions` instead
node:CustomProviderOptions: Use `CoverageOptions` instead
node:createVitest: The `mode` argument is no longer used. Use `createVitest(options, viteOverrides?, vitestOptions?)` instead.
node:isFileServingAllowed: Check if the url is allowed to be served, via the `server.fs` config. Use the `isFileLoadingAllowed` function instead.
node:startVitest: Start Vitest programmatically Returns a Vitest instance if initialized successfully. The `mode` argument is no longer used. Use `startVitest(cliFilters?, options?, viteOverrides?, vitestOptions?)` instead.
config:Plugin.shouldTransformCachedModule: This hook is not supported by Rolldown yet. But the type is declared for compatibility. This hook is **not** deprecated. It is marked as deprecated just to make it clear that this hook is currently a no-op.
config:Plugin.resolveDynamicImport: Defines a custom resolver for dynamic imports. This hook exists only for Rollup compatibility. Please use {@linkcode resolveId} instead.
config:ViteUserConfig.esbuild: Transform options to pass to esbuild. Or set to `false` to disable esbuild. Use `oxc` option instead.