Showing preview only (8,668K chars total). Download the full file or copy to clipboard to get everything.
Repository: vitest-dev/vitest
Branch: main
Commit: 0685b6f02757
Files: 2731
Total size: 7.8 MB
Directory structure:
gitextract_qnymewnt/
├── .claude/
│ └── agents/
│ └── vitest-test-writer.md
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ ├── docs.yml
│ │ └── feature_request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── actions/
│ │ ├── setup-and-cache/
│ │ │ └── action.yml
│ │ └── setup-playwright/
│ │ └── action.yml
│ ├── commit-convention.md
│ ├── copilot-instructions.md
│ ├── renovate.json5
│ └── workflows/
│ ├── ci.yml
│ ├── cr.yml
│ ├── ecosystem-ci-trigger.yml
│ ├── issue-close-require.yml
│ ├── issue-labeled.yml
│ ├── lock-closed-issues.yml
│ └── publish.yml
├── .gitignore
├── .npmrc
├── .tazerc.json
├── .vscode/
│ ├── extensions.json
│ ├── settings.json
│ └── tasks.json
├── AGENTS.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.json
├── LICENSE
├── README.md
├── SECURITY.md
├── docs/
│ ├── .vitepress/
│ │ ├── blog.data.ts
│ │ ├── components/
│ │ │ ├── Advanced.vue
│ │ │ ├── ArrowDown.vue
│ │ │ ├── BlogIndex.vue
│ │ │ ├── Box.vue
│ │ │ ├── CRoot.vue
│ │ │ ├── CourseLink.vue
│ │ │ ├── Deprecated.vue
│ │ │ ├── Experimental.vue
│ │ │ ├── FeaturesList.vue
│ │ │ ├── HomePage.vue
│ │ │ ├── ListItem.vue
│ │ │ └── Version.vue
│ │ ├── config.ts
│ │ ├── contributors.ts
│ │ ├── meta.ts
│ │ ├── scripts/
│ │ │ ├── cli-generator.ts
│ │ │ ├── fetch-avatars.ts
│ │ │ ├── pwa.ts
│ │ │ └── transformHead.ts
│ │ ├── sponsors.ts
│ │ └── theme/
│ │ ├── FeatureGrid.vue
│ │ ├── Hero.vue
│ │ ├── Home.vue
│ │ ├── Intro.vue
│ │ ├── index.ts
│ │ ├── pwa.ts
│ │ └── styles.css
│ ├── api/
│ │ ├── advanced/
│ │ │ ├── artifacts.md
│ │ │ ├── import-example.md
│ │ │ ├── metadata.md
│ │ │ ├── plugin.md
│ │ │ ├── reporters.md
│ │ │ ├── runner.md
│ │ │ ├── test-case.md
│ │ │ ├── test-collection.md
│ │ │ ├── test-module.md
│ │ │ ├── test-project.md
│ │ │ ├── test-specification.md
│ │ │ ├── test-suite.md
│ │ │ └── vitest.md
│ │ ├── assert-type.md
│ │ ├── assert.md
│ │ ├── browser/
│ │ │ ├── assertions.md
│ │ │ ├── commands.md
│ │ │ ├── context.md
│ │ │ ├── interactivity.md
│ │ │ ├── locators.md
│ │ │ ├── react.md
│ │ │ ├── svelte.md
│ │ │ └── vue.md
│ │ ├── describe.md
│ │ ├── expect-typeof.md
│ │ ├── expect.md
│ │ ├── hooks.md
│ │ ├── mock.md
│ │ ├── test.md
│ │ └── vi.md
│ ├── blog/
│ │ ├── vitest-3-2.md
│ │ ├── vitest-3.md
│ │ ├── vitest-4-1.md
│ │ └── vitest-4.md
│ ├── blog.md
│ ├── config/
│ │ ├── alias.md
│ │ ├── allowonly.md
│ │ ├── api.md
│ │ ├── attachmentsdir.md
│ │ ├── bail.md
│ │ ├── benchmark.md
│ │ ├── browser/
│ │ │ ├── api.md
│ │ │ ├── commands.md
│ │ │ ├── connecttimeout.md
│ │ │ ├── detailspanelposition.md
│ │ │ ├── enabled.md
│ │ │ ├── expect.md
│ │ │ ├── headless.md
│ │ │ ├── instances.md
│ │ │ ├── isolate.md
│ │ │ ├── locators.md
│ │ │ ├── orchestratorscripts.md
│ │ │ ├── playwright.md
│ │ │ ├── preview.md
│ │ │ ├── provider.md
│ │ │ ├── screenshotdirectory.md
│ │ │ ├── screenshotfailures.md
│ │ │ ├── testerhtmlpath.md
│ │ │ ├── trace.md
│ │ │ ├── trackunhandlederrors.md
│ │ │ ├── ui.md
│ │ │ ├── viewport.md
│ │ │ └── webdriverio.md
│ │ ├── cache.md
│ │ ├── chaiconfig.md
│ │ ├── clearmocks.md
│ │ ├── coverage.md
│ │ ├── css.md
│ │ ├── dangerouslyignoreunhandlederrors.md
│ │ ├── deps.md
│ │ ├── detectasyncleaks.md
│ │ ├── diff.md
│ │ ├── dir.md
│ │ ├── disableconsoleintercept.md
│ │ ├── env.md
│ │ ├── environment.md
│ │ ├── environmentoptions.md
│ │ ├── exclude.md
│ │ ├── execargv.md
│ │ ├── expandsnapshotdiff.md
│ │ ├── expect.md
│ │ ├── experimental.md
│ │ ├── faketimers.md
│ │ ├── fileparallelism.md
│ │ ├── forcereruntriggers.md
│ │ ├── globals.md
│ │ ├── globalsetup.md
│ │ ├── hideskippedtests.md
│ │ ├── hooktimeout.md
│ │ ├── include-source.md
│ │ ├── include.md
│ │ ├── includetasklocation.md
│ │ ├── index.md
│ │ ├── isolate.md
│ │ ├── logheapusage.md
│ │ ├── maxconcurrency.md
│ │ ├── maxworkers.md
│ │ ├── mockreset.md
│ │ ├── mode.md
│ │ ├── name.md
│ │ ├── onconsolelog.md
│ │ ├── onstacktrace.md
│ │ ├── onunhandlederror.md
│ │ ├── open.md
│ │ ├── outputfile.md
│ │ ├── passwithnotests.md
│ │ ├── pool.md
│ │ ├── printconsoletrace.md
│ │ ├── projects.md
│ │ ├── provide.md
│ │ ├── reporters.md
│ │ ├── resolvesnapshotpath.md
│ │ ├── restoremocks.md
│ │ ├── retry.md
│ │ ├── root.md
│ │ ├── runner.md
│ │ ├── sequence.md
│ │ ├── server.md
│ │ ├── setupfiles.md
│ │ ├── silent.md
│ │ ├── slowtestthreshold.md
│ │ ├── snapshotenvironment.md
│ │ ├── snapshotformat.md
│ │ ├── snapshotserializers.md
│ │ ├── stricttags.md
│ │ ├── tags.md
│ │ ├── teardowntimeout.md
│ │ ├── testnamepattern.md
│ │ ├── testtimeout.md
│ │ ├── typecheck.md
│ │ ├── ui.md
│ │ ├── unstubenvs.md
│ │ ├── unstubglobals.md
│ │ ├── update.md
│ │ ├── vmmemorylimit.md
│ │ ├── watch.md
│ │ └── watchtriggerpatterns.md
│ ├── guide/
│ │ ├── advanced/
│ │ │ ├── index.md
│ │ │ ├── pool.md
│ │ │ ├── reporters.md
│ │ │ └── tests.md
│ │ ├── browser/
│ │ │ ├── component-testing.md
│ │ │ ├── index.md
│ │ │ ├── multiple-setups.md
│ │ │ ├── trace-view.md
│ │ │ ├── visual-regression-testing.md
│ │ │ └── why.md
│ │ ├── cli-generated.md
│ │ ├── cli.md
│ │ ├── common-errors.md
│ │ ├── comparisons.md
│ │ ├── coverage.md
│ │ ├── debugging.md
│ │ ├── environment.md
│ │ ├── examples/
│ │ │ ├── projects-workspace.md
│ │ │ └── promise-done.md
│ │ ├── extending-matchers.md
│ │ ├── features.md
│ │ ├── filtering.md
│ │ ├── ide.md
│ │ ├── improving-performance.md
│ │ ├── in-source.md
│ │ ├── index.md
│ │ ├── lifecycle.md
│ │ ├── migration.md
│ │ ├── mocking/
│ │ │ ├── classes.md
│ │ │ ├── dates.md
│ │ │ ├── file-system.md
│ │ │ ├── functions.md
│ │ │ ├── globals.md
│ │ │ ├── modules.md
│ │ │ ├── requests.md
│ │ │ └── timers.md
│ │ ├── mocking.md
│ │ ├── open-telemetry.md
│ │ ├── parallelism.md
│ │ ├── profiling-test-performance.md
│ │ ├── projects.md
│ │ ├── recipes.md
│ │ ├── reporters.md
│ │ ├── snapshot.md
│ │ ├── test-annotations.md
│ │ ├── test-context.md
│ │ ├── test-tags.md
│ │ ├── testing-types.md
│ │ ├── ui.md
│ │ ├── using-plugins.md
│ │ └── why.md
│ ├── index.md
│ ├── package.json
│ ├── public/
│ │ ├── _headers
│ │ ├── new-reporter.webm
│ │ └── robots.txt
│ ├── pwa-assets.config.ts
│ ├── team.md
│ ├── todo.md
│ ├── tsconfig.json
│ └── vite.config.ts
├── eslint.config.js
├── examples/
│ ├── basic/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── basic.ts
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ └── suite.test.ts.snap
│ │ │ ├── basic.test.ts
│ │ │ └── suite.test.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.ts
│ ├── fastify/
│ │ ├── mockData.ts
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app.ts
│ │ │ └── index.ts
│ │ └── test/
│ │ └── app.test.ts
│ ├── in-source-test/
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── index.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ ├── lit/
│ │ ├── .gitignore
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── my-button.ts
│ │ ├── test/
│ │ │ └── basic.test.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.ts
│ ├── opentelemetry/
│ │ ├── README.md
│ │ ├── docker-compose.yaml
│ │ ├── jaeger-config.yml
│ │ ├── otel-browser.js
│ │ ├── otel.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── basic.test.ts
│ │ │ ├── basic.ts
│ │ │ └── other.test.ts
│ │ └── vite.config.ts
│ ├── profiling/
│ │ ├── global-setup.ts
│ │ ├── package.json
│ │ ├── src/
│ │ │ └── prime-number.ts
│ │ ├── test/
│ │ │ └── prime-number.test.ts
│ │ └── vitest.config.ts
│ ├── projects/
│ │ ├── package.json
│ │ ├── packages/
│ │ │ ├── client/
│ │ │ │ ├── components/
│ │ │ │ │ └── Link.tsx
│ │ │ │ ├── test/
│ │ │ │ │ └── basic.test.tsx
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.setup.ts
│ │ │ └── server/
│ │ │ ├── mockData.ts
│ │ │ ├── src/
│ │ │ │ ├── app.ts
│ │ │ │ └── index.ts
│ │ │ └── test/
│ │ │ └── app.test.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ └── typecheck/
│ ├── package.json
│ ├── test/
│ │ ├── normal.test.ts
│ │ └── type.test-d.ts
│ ├── tsconfig.json
│ └── vite.config.ts
├── netlify.toml
├── package.json
├── packages/
│ ├── browser/
│ │ ├── README.md
│ │ ├── aria-role.d.ts
│ │ ├── context.d.ts
│ │ ├── context.js
│ │ ├── dummy.js
│ │ ├── jest-dom.d.ts
│ │ ├── matchers.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── scripts/
│ │ │ └── build-client.js
│ │ ├── src/
│ │ │ ├── client/
│ │ │ │ ├── channel.ts
│ │ │ │ ├── client.ts
│ │ │ │ ├── orchestrator.html
│ │ │ │ ├── orchestrator.ts
│ │ │ │ ├── public/
│ │ │ │ │ ├── error-catcher.js
│ │ │ │ │ └── esm-client-injector.js
│ │ │ │ ├── tester/
│ │ │ │ │ ├── context.ts
│ │ │ │ │ ├── dialog.ts
│ │ │ │ │ ├── expect/
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── toBeChecked.ts
│ │ │ │ │ │ ├── toBeEmptyDOMElement.ts
│ │ │ │ │ │ ├── toBeEnabled.ts
│ │ │ │ │ │ ├── toBeInTheDocument.ts
│ │ │ │ │ │ ├── toBeInViewport.ts
│ │ │ │ │ │ ├── toBeInvalid.ts
│ │ │ │ │ │ ├── toBePartiallyChecked.ts
│ │ │ │ │ │ ├── toBeRequired.ts
│ │ │ │ │ │ ├── toBeVisible.ts
│ │ │ │ │ │ ├── toContainElement.ts
│ │ │ │ │ │ ├── toContainHTML.ts
│ │ │ │ │ │ ├── toHaveAccessibleDescription.ts
│ │ │ │ │ │ ├── toHaveAccessibleErrorMessage.ts
│ │ │ │ │ │ ├── toHaveAccessibleName.ts
│ │ │ │ │ │ ├── toHaveAttribute.ts
│ │ │ │ │ │ ├── toHaveClass.ts
│ │ │ │ │ │ ├── toHaveDisplayValue.ts
│ │ │ │ │ │ ├── toHaveFocus.ts
│ │ │ │ │ │ ├── toHaveFormValues.ts
│ │ │ │ │ │ ├── toHaveRole.ts
│ │ │ │ │ │ ├── toHaveSelection.ts
│ │ │ │ │ │ ├── toHaveStyle.ts
│ │ │ │ │ │ ├── toHaveTextContent.ts
│ │ │ │ │ │ ├── toHaveValue.ts
│ │ │ │ │ │ ├── toMatchScreenshot.ts
│ │ │ │ │ │ └── utils.ts
│ │ │ │ │ ├── expect-element.ts
│ │ │ │ │ ├── locators/
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── logger.ts
│ │ │ │ │ ├── mocker-interceptor.ts
│ │ │ │ │ ├── mocker.ts
│ │ │ │ │ ├── rpc.ts
│ │ │ │ │ ├── runner.ts
│ │ │ │ │ ├── snapshot.ts
│ │ │ │ │ ├── state.ts
│ │ │ │ │ ├── tester-utils.ts
│ │ │ │ │ ├── tester.html
│ │ │ │ │ └── tester.ts
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── ui.ts
│ │ │ │ ├── utils.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── node/
│ │ │ │ ├── cdp.ts
│ │ │ │ ├── commands/
│ │ │ │ │ ├── fs.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── screenshot.ts
│ │ │ │ │ ├── screenshotMatcher/
│ │ │ │ │ │ ├── codecs/
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── png.ts
│ │ │ │ │ │ ├── comparators/
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── pixelmatch.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ └── utils.ts
│ │ │ │ │ └── trace.ts
│ │ │ │ ├── constants.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── middlewares/
│ │ │ │ │ ├── orchestratorMiddleware.ts
│ │ │ │ │ ├── testerMiddleware.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── plugin.ts
│ │ │ │ ├── plugins/
│ │ │ │ │ └── pluginContext.ts
│ │ │ │ ├── project.ts
│ │ │ │ ├── projectParent.ts
│ │ │ │ ├── rpc.ts
│ │ │ │ ├── serverOrchestrator.ts
│ │ │ │ ├── serverTester.ts
│ │ │ │ ├── state.ts
│ │ │ │ └── utils.ts
│ │ │ ├── shared/
│ │ │ │ └── screenshotMatcher/
│ │ │ │ └── types.ts
│ │ │ └── types.ts
│ │ ├── tsconfig.json
│ │ └── utils.d.ts
│ ├── browser-playwright/
│ │ ├── README.md
│ │ ├── context.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── commands/
│ │ │ │ ├── clear.ts
│ │ │ │ ├── click.ts
│ │ │ │ ├── dragAndDrop.ts
│ │ │ │ ├── fill.ts
│ │ │ │ ├── hover.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── keyboard.ts
│ │ │ │ ├── screenshot.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── tab.ts
│ │ │ │ ├── trace.ts
│ │ │ │ ├── type.ts
│ │ │ │ ├── upload.ts
│ │ │ │ ├── utils.ts
│ │ │ │ └── wheel.ts
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ ├── locators.ts
│ │ │ └── playwright.ts
│ │ └── tsconfig.json
│ ├── browser-preview/
│ │ ├── README.md
│ │ ├── context.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ ├── locators.ts
│ │ │ └── preview.ts
│ │ └── tsconfig.json
│ ├── browser-webdriverio/
│ │ ├── README.md
│ │ ├── context.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── commands/
│ │ │ │ ├── clear.ts
│ │ │ │ ├── click.ts
│ │ │ │ ├── dragAndDrop.ts
│ │ │ │ ├── fill.ts
│ │ │ │ ├── hover.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── keyboard.ts
│ │ │ │ ├── screenshot.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── tab.ts
│ │ │ │ ├── type.ts
│ │ │ │ ├── upload.ts
│ │ │ │ ├── utils.ts
│ │ │ │ ├── viewport.ts
│ │ │ │ └── wheel.ts
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ ├── locators.ts
│ │ │ └── webdriverio.ts
│ │ └── tsconfig.json
│ ├── coverage-istanbul/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ └── provider.ts
│ │ └── tsconfig.json
│ ├── coverage-v8/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── browser.ts
│ │ │ ├── index.ts
│ │ │ ├── load-provider.ts
│ │ │ └── provider.ts
│ │ └── tsconfig.json
│ ├── expect/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── chai-style-assertions.ts
│ │ │ ├── constants.ts
│ │ │ ├── custom-matchers.ts
│ │ │ ├── index.ts
│ │ │ ├── jest-asymmetric-matchers.ts
│ │ │ ├── jest-expect.ts
│ │ │ ├── jest-extend.ts
│ │ │ ├── jest-matcher-utils.ts
│ │ │ ├── jest-utils.ts
│ │ │ ├── state.ts
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
│ ├── mocker/
│ │ ├── EXPORTS.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── automocker.ts
│ │ │ ├── browser/
│ │ │ │ ├── auto-register.ts
│ │ │ │ ├── hints.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── interceptor-msw.ts
│ │ │ │ ├── interceptor-native.ts
│ │ │ │ ├── interceptor.ts
│ │ │ │ ├── mocker.ts
│ │ │ │ ├── register.ts
│ │ │ │ └── utils.ts
│ │ │ ├── index.ts
│ │ │ ├── node/
│ │ │ │ ├── automock.ts
│ │ │ │ ├── automockPlugin.ts
│ │ │ │ ├── dynamicImportPlugin.ts
│ │ │ │ ├── esmWalker.ts
│ │ │ │ ├── hoistMocks.ts
│ │ │ │ ├── hoistMocksPlugin.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── interceptorPlugin.ts
│ │ │ │ ├── mockerPlugin.ts
│ │ │ │ ├── parsers.ts
│ │ │ │ ├── redirect.ts
│ │ │ │ ├── resolver.ts
│ │ │ │ └── transforms.ts
│ │ │ ├── registry.ts
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
│ ├── pretty-format/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── collections.ts
│ │ │ ├── index.ts
│ │ │ ├── plugins/
│ │ │ │ ├── AsymmetricMatcher.ts
│ │ │ │ ├── DOMCollection.ts
│ │ │ │ ├── DOMElement.ts
│ │ │ │ ├── Immutable.ts
│ │ │ │ ├── ReactElement.ts
│ │ │ │ ├── ReactTestComponent.ts
│ │ │ │ └── lib/
│ │ │ │ ├── escapeHTML.ts
│ │ │ │ └── markup.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── runner/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── artifact.ts
│ │ │ ├── collect.ts
│ │ │ ├── context.ts
│ │ │ ├── errors.ts
│ │ │ ├── fixture.ts
│ │ │ ├── hooks.ts
│ │ │ ├── index.ts
│ │ │ ├── map.ts
│ │ │ ├── run.ts
│ │ │ ├── setup.ts
│ │ │ ├── suite.ts
│ │ │ ├── test-state.ts
│ │ │ ├── types/
│ │ │ │ ├── runner.ts
│ │ │ │ └── tasks.ts
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── chain.ts
│ │ │ ├── collect.ts
│ │ │ ├── index.ts
│ │ │ ├── limit-concurrency.ts
│ │ │ ├── suite.ts
│ │ │ ├── tags.ts
│ │ │ └── tasks.ts
│ │ ├── tsconfig.json
│ │ ├── types.d.ts
│ │ └── utils.d.ts
│ ├── snapshot/
│ │ ├── README.md
│ │ ├── environment.d.ts
│ │ ├── manager.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── client.ts
│ │ │ ├── env/
│ │ │ │ └── node.ts
│ │ │ ├── environment.ts
│ │ │ ├── index.ts
│ │ │ ├── manager.ts
│ │ │ ├── port/
│ │ │ │ ├── inlineSnapshot.ts
│ │ │ │ ├── mockSerializer.ts
│ │ │ │ ├── plugins.ts
│ │ │ │ ├── rawSnapshot.ts
│ │ │ │ ├── state.ts
│ │ │ │ └── utils.ts
│ │ │ └── types/
│ │ │ ├── environment.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── spy/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── ui/
│ │ ├── CONTRIBUTING.md
│ │ ├── README.md
│ │ ├── browser.dev.js
│ │ ├── client/
│ │ │ ├── App.vue
│ │ │ ├── components/
│ │ │ │ ├── AnnotationAttachmentImage.vue
│ │ │ │ ├── Badge.vue
│ │ │ │ ├── BrowserIframe.vue
│ │ │ │ ├── ClosedDetailsHeader.vue
│ │ │ │ ├── CodeMirrorContainer.vue
│ │ │ │ ├── ConnectionOverlay.vue
│ │ │ │ ├── Coverage.vue
│ │ │ │ ├── Dashboard.vue
│ │ │ │ ├── DetailsHeaderButtons.vue
│ │ │ │ ├── FailureScreenshot.vue
│ │ │ │ ├── FileDetails.vue
│ │ │ │ ├── FilterStatus.vue
│ │ │ │ ├── IconAction.vue
│ │ │ │ ├── IconButton.vue
│ │ │ │ ├── Modal.vue
│ │ │ │ ├── ModuleGraphImportBreakdown.vue
│ │ │ │ ├── ModuleTransformResultView.vue
│ │ │ │ ├── Navigation.vue
│ │ │ │ ├── ProgressBar.vue
│ │ │ │ ├── ResultsPanel.vue
│ │ │ │ ├── StatusIcon.vue
│ │ │ │ ├── artifacts/
│ │ │ │ │ ├── ArtifactTemplate.vue
│ │ │ │ │ ├── Artifacts.vue
│ │ │ │ │ └── visual-regression/
│ │ │ │ │ ├── SmallTabs.spec.ts
│ │ │ │ │ ├── SmallTabs.vue
│ │ │ │ │ ├── SmallTabsPane.vue
│ │ │ │ │ ├── VisualRegression.spec.ts
│ │ │ │ │ ├── VisualRegression.vue
│ │ │ │ │ ├── VisualRegressionImage.vue
│ │ │ │ │ ├── VisualRegressionImageContainer.vue
│ │ │ │ │ ├── VisualRegressionSlider.spec.ts
│ │ │ │ │ └── VisualRegressionSlider.vue
│ │ │ │ ├── dashboard/
│ │ │ │ │ ├── DashboardEntry.spec.ts
│ │ │ │ │ ├── DashboardEntry.vue
│ │ │ │ │ ├── ErrorEntry.vue
│ │ │ │ │ ├── TestFilesEntry.vue
│ │ │ │ │ ├── TestsEntry.vue
│ │ │ │ │ └── TestsFilesContainer.vue
│ │ │ │ ├── explorer/
│ │ │ │ │ ├── Explorer.vue
│ │ │ │ │ └── ExplorerItem.vue
│ │ │ │ └── views/
│ │ │ │ ├── ScreenshotError.vue
│ │ │ │ ├── ViewConsoleOutput.vue
│ │ │ │ ├── ViewConsoleOutputEntry.spec.ts
│ │ │ │ ├── ViewConsoleOutputEntry.vue
│ │ │ │ ├── ViewEditor.vue
│ │ │ │ ├── ViewModuleGraph.vue
│ │ │ │ ├── ViewReport.spec.ts
│ │ │ │ ├── ViewReport.vue
│ │ │ │ ├── ViewReportError.vue
│ │ │ │ └── ViewTestReport.vue
│ │ │ ├── composables/
│ │ │ │ ├── api.ts
│ │ │ │ ├── attachments.ts
│ │ │ │ ├── browser.ts
│ │ │ │ ├── client/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── state.ts
│ │ │ │ │ └── static.ts
│ │ │ │ ├── codemirror.ts
│ │ │ │ ├── dark.ts
│ │ │ │ ├── error.ts
│ │ │ │ ├── explorer/
│ │ │ │ │ ├── collapse.ts
│ │ │ │ │ ├── collector.ts
│ │ │ │ │ ├── expand.ts
│ │ │ │ │ ├── filter.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── search.ts
│ │ │ │ │ ├── state.ts
│ │ │ │ │ ├── tree.ts
│ │ │ │ │ ├── types.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── location.ts
│ │ │ │ ├── module-graph.ts
│ │ │ │ ├── navigation.ts
│ │ │ │ ├── params.ts
│ │ │ │ └── small-tabs.ts
│ │ │ ├── constants.ts
│ │ │ ├── global-setup.ts
│ │ │ ├── main.ts
│ │ │ ├── pages/
│ │ │ │ └── index.vue
│ │ │ ├── shim.d.ts
│ │ │ ├── styles/
│ │ │ │ └── main.css
│ │ │ ├── test.ts
│ │ │ └── utils/
│ │ │ ├── escape.ts
│ │ │ └── task.ts
│ │ ├── explorer.md
│ │ ├── index.html
│ │ ├── node/
│ │ │ ├── index.ts
│ │ │ ├── reporter.ts
│ │ │ └── tsconfig.json
│ │ ├── package.json
│ │ ├── reporter.d.ts
│ │ ├── rollup.config.js
│ │ ├── shim.d.ts
│ │ ├── tsconfig.json
│ │ ├── types.ts
│ │ ├── vite.config.ts
│ │ └── vitest.config.ts
│ ├── utils/
│ │ ├── README.md
│ │ ├── diff.d.ts
│ │ ├── error.d.ts
│ │ ├── helpers.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── source-map.ts
│ │ ├── src/
│ │ │ ├── constants.ts
│ │ │ ├── diff/
│ │ │ │ ├── cleanupSemantic.ts
│ │ │ │ ├── constants.ts
│ │ │ │ ├── diffLines.ts
│ │ │ │ ├── diffStrings.ts
│ │ │ │ ├── getAlignedDiffs.ts
│ │ │ │ ├── getType.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── joinAlignedDiffs.ts
│ │ │ │ ├── normalizeDiffOptions.ts
│ │ │ │ ├── printDiffs.ts
│ │ │ │ └── types.ts
│ │ │ ├── display.ts
│ │ │ ├── error.ts
│ │ │ ├── helpers.ts
│ │ │ ├── index.ts
│ │ │ ├── nanoid.ts
│ │ │ ├── offset.ts
│ │ │ ├── random.ts
│ │ │ ├── resolver.ts
│ │ │ ├── serialize.ts
│ │ │ ├── source-map/
│ │ │ │ └── node.ts
│ │ │ ├── source-map.ts
│ │ │ ├── timers.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── vitest/
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── browser/
│ │ │ ├── context.d.ts
│ │ │ └── context.js
│ │ ├── config.d.ts
│ │ ├── coverage.d.ts
│ │ ├── environments.d.ts
│ │ ├── globals.d.ts
│ │ ├── import-meta.d.ts
│ │ ├── importMeta.d.ts
│ │ ├── index.cjs
│ │ ├── index.d.cts
│ │ ├── jsdom.d.ts
│ │ ├── mocker.d.ts
│ │ ├── node.d.ts
│ │ ├── optional-types.d.ts
│ │ ├── package.json
│ │ ├── reporters.d.ts
│ │ ├── rollup.config.js
│ │ ├── runners.d.ts
│ │ ├── snapshot.d.ts
│ │ ├── src/
│ │ │ ├── api/
│ │ │ │ ├── check.ts
│ │ │ │ ├── setup.ts
│ │ │ │ └── types.ts
│ │ │ ├── constants.ts
│ │ │ ├── create/
│ │ │ │ └── browser/
│ │ │ │ ├── creator.ts
│ │ │ │ └── examples.ts
│ │ │ ├── defaults.ts
│ │ │ ├── integrations/
│ │ │ │ ├── chai/
│ │ │ │ │ ├── config.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── poll.ts
│ │ │ │ │ └── setup.ts
│ │ │ │ ├── coverage.ts
│ │ │ │ ├── css/
│ │ │ │ │ └── css-modules.ts
│ │ │ │ ├── env/
│ │ │ │ │ ├── edge-runtime.ts
│ │ │ │ │ ├── happy-dom.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── jsdom-keys.ts
│ │ │ │ │ ├── jsdom.ts
│ │ │ │ │ ├── loader.ts
│ │ │ │ │ ├── node.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── globals.ts
│ │ │ │ ├── inject.ts
│ │ │ │ ├── mock/
│ │ │ │ │ ├── date.ts
│ │ │ │ │ └── timers.ts
│ │ │ │ ├── snapshot/
│ │ │ │ │ ├── chai.ts
│ │ │ │ │ └── environments/
│ │ │ │ │ ├── node.ts
│ │ │ │ │ └── resolveSnapshotEnvironment.ts
│ │ │ │ ├── spy.ts
│ │ │ │ ├── vi.ts
│ │ │ │ └── wait.ts
│ │ │ ├── node/
│ │ │ │ ├── ast-collect.ts
│ │ │ │ ├── browser/
│ │ │ │ │ └── sessions.ts
│ │ │ │ ├── cache/
│ │ │ │ │ ├── files.ts
│ │ │ │ │ ├── fsModuleCache.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── results.ts
│ │ │ │ ├── cli/
│ │ │ │ │ ├── cac.ts
│ │ │ │ │ ├── cli-api.ts
│ │ │ │ │ ├── cli-config.ts
│ │ │ │ │ ├── completions.ts
│ │ │ │ │ └── filter.ts
│ │ │ │ ├── cli.ts
│ │ │ │ ├── config/
│ │ │ │ │ ├── resolveConfig.ts
│ │ │ │ │ └── serializeConfig.ts
│ │ │ │ ├── core.ts
│ │ │ │ ├── coverage.ts
│ │ │ │ ├── create.ts
│ │ │ │ ├── environments/
│ │ │ │ │ ├── fetchModule.ts
│ │ │ │ │ ├── normalizeUrl.ts
│ │ │ │ │ └── serverRunner.ts
│ │ │ │ ├── errors.ts
│ │ │ │ ├── git.ts
│ │ │ │ ├── globalSetup.ts
│ │ │ │ ├── hash.ts
│ │ │ │ ├── logger.ts
│ │ │ │ ├── module-diagnostic.ts
│ │ │ │ ├── packageInstaller.ts
│ │ │ │ ├── plugins/
│ │ │ │ │ ├── coverageTransform.ts
│ │ │ │ │ ├── cssEnabler.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── metaEnvReplacer.ts
│ │ │ │ │ ├── mocks.ts
│ │ │ │ │ ├── normalizeURL.ts
│ │ │ │ │ ├── optimizer.ts
│ │ │ │ │ ├── publicConfig.ts
│ │ │ │ │ ├── runnerTransform.ts
│ │ │ │ │ ├── utils.ts
│ │ │ │ │ ├── vitestResolver.ts
│ │ │ │ │ └── workspace.ts
│ │ │ │ ├── pool.ts
│ │ │ │ ├── pools/
│ │ │ │ │ ├── browser.ts
│ │ │ │ │ ├── pool.ts
│ │ │ │ │ ├── poolRunner.ts
│ │ │ │ │ ├── rpc.ts
│ │ │ │ │ ├── types.ts
│ │ │ │ │ └── workers/
│ │ │ │ │ ├── forksWorker.ts
│ │ │ │ │ ├── threadsWorker.ts
│ │ │ │ │ ├── typecheckWorker.ts
│ │ │ │ │ ├── vmForksWorker.ts
│ │ │ │ │ └── vmThreadsWorker.ts
│ │ │ │ ├── printError.ts
│ │ │ │ ├── project.ts
│ │ │ │ ├── projects/
│ │ │ │ │ └── resolveProjects.ts
│ │ │ │ ├── reporters/
│ │ │ │ │ ├── agent.ts
│ │ │ │ │ ├── base.ts
│ │ │ │ │ ├── benchmark/
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── json-formatter.ts
│ │ │ │ │ │ ├── reporter.ts
│ │ │ │ │ │ ├── tableRender.ts
│ │ │ │ │ │ └── verbose.ts
│ │ │ │ │ ├── blob.ts
│ │ │ │ │ ├── default.ts
│ │ │ │ │ ├── dot.ts
│ │ │ │ │ ├── github-actions.ts
│ │ │ │ │ ├── hanging-process.ts
│ │ │ │ │ ├── html.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── json.ts
│ │ │ │ │ ├── junit.ts
│ │ │ │ │ ├── renderers/
│ │ │ │ │ │ ├── figures.ts
│ │ │ │ │ │ ├── indented-logger.ts
│ │ │ │ │ │ ├── utils.ts
│ │ │ │ │ │ └── windowedRenderer.ts
│ │ │ │ │ ├── reported-tasks.ts
│ │ │ │ │ ├── summary.ts
│ │ │ │ │ ├── tap-flat.ts
│ │ │ │ │ ├── tap.ts
│ │ │ │ │ ├── tree.ts
│ │ │ │ │ ├── utils.ts
│ │ │ │ │ └── verbose.ts
│ │ │ │ ├── resolver.ts
│ │ │ │ ├── sequencers/
│ │ │ │ │ ├── BaseSequencer.ts
│ │ │ │ │ ├── RandomSequencer.ts
│ │ │ │ │ └── types.ts
│ │ │ │ ├── specifications.ts
│ │ │ │ ├── state.ts
│ │ │ │ ├── stdin.ts
│ │ │ │ ├── tags.ts
│ │ │ │ ├── test-run.ts
│ │ │ │ ├── test-specification.ts
│ │ │ │ ├── types/
│ │ │ │ │ ├── benchmark.ts
│ │ │ │ │ ├── browser.ts
│ │ │ │ │ ├── config.ts
│ │ │ │ │ ├── coverage.ts
│ │ │ │ │ ├── plugin.ts
│ │ │ │ │ ├── reporter.ts
│ │ │ │ │ ├── tests.ts
│ │ │ │ │ ├── vite.ts
│ │ │ │ │ └── worker.ts
│ │ │ │ ├── vite.ts
│ │ │ │ ├── viteLogger.ts
│ │ │ │ ├── watch-filter.ts
│ │ │ │ └── watcher.ts
│ │ │ ├── paths.ts
│ │ │ ├── public/
│ │ │ │ ├── browser.ts
│ │ │ │ ├── config.ts
│ │ │ │ ├── coverage.ts
│ │ │ │ ├── environments.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── node.ts
│ │ │ │ ├── reporters.ts
│ │ │ │ ├── runners.ts
│ │ │ │ ├── runtime.ts
│ │ │ │ ├── snapshot.ts
│ │ │ │ ├── suite.ts
│ │ │ │ └── worker.ts
│ │ │ ├── runtime/
│ │ │ │ ├── benchmark.ts
│ │ │ │ ├── cleanup.ts
│ │ │ │ ├── config.ts
│ │ │ │ ├── console.ts
│ │ │ │ ├── detect-async-leaks.ts
│ │ │ │ ├── external-executor.ts
│ │ │ │ ├── inspector.ts
│ │ │ │ ├── listeners.ts
│ │ │ │ ├── moduleRunner/
│ │ │ │ │ ├── bareModuleMocker.ts
│ │ │ │ │ ├── cachedResolver.ts
│ │ │ │ │ ├── errorCatcher.ts
│ │ │ │ │ ├── evaluatedModules.ts
│ │ │ │ │ ├── moduleDebug.ts
│ │ │ │ │ ├── moduleEvaluator.ts
│ │ │ │ │ ├── moduleMocker.ts
│ │ │ │ │ ├── moduleRunner.ts
│ │ │ │ │ ├── moduleTransport.ts
│ │ │ │ │ ├── nativeModuleMocker.ts
│ │ │ │ │ ├── startVitestModuleRunner.ts
│ │ │ │ │ ├── testModuleRunner.ts
│ │ │ │ │ ├── types.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── nodejsWorkerLoader.ts
│ │ │ │ ├── rpc.ts
│ │ │ │ ├── runBaseTests.ts
│ │ │ │ ├── runVmTests.ts
│ │ │ │ ├── runners/
│ │ │ │ │ ├── benchmark.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── test.ts
│ │ │ │ ├── setup-common.ts
│ │ │ │ ├── setup-node.ts
│ │ │ │ ├── types/
│ │ │ │ │ ├── benchmark.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── utils.ts
│ │ │ │ ├── vm/
│ │ │ │ │ ├── commonjs-executor.ts
│ │ │ │ │ ├── esm-executor.ts
│ │ │ │ │ ├── file-map.ts
│ │ │ │ │ ├── types.ts
│ │ │ │ │ ├── utils.ts
│ │ │ │ │ └── vite-executor.ts
│ │ │ │ ├── worker.ts
│ │ │ │ └── workers/
│ │ │ │ ├── base.ts
│ │ │ │ ├── forks.ts
│ │ │ │ ├── init-forks.ts
│ │ │ │ ├── init-threads.ts
│ │ │ │ ├── init.ts
│ │ │ │ ├── native.ts
│ │ │ │ ├── threads.ts
│ │ │ │ ├── types.ts
│ │ │ │ ├── vm.ts
│ │ │ │ ├── vmForks.ts
│ │ │ │ └── vmThreads.ts
│ │ │ ├── shims.dev.d.ts
│ │ │ ├── typecheck/
│ │ │ │ ├── assertType.ts
│ │ │ │ ├── collect.ts
│ │ │ │ ├── expectTypeOf.ts
│ │ │ │ ├── parse.ts
│ │ │ │ ├── typechecker.ts
│ │ │ │ └── types.ts
│ │ │ ├── types/
│ │ │ │ ├── browser.ts
│ │ │ │ ├── environment.ts
│ │ │ │ ├── general.ts
│ │ │ │ ├── global.ts
│ │ │ │ ├── happy-dom-options.ts
│ │ │ │ ├── jsdom-options.ts
│ │ │ │ ├── mocker.ts
│ │ │ │ ├── module-locations.ts
│ │ │ │ ├── rpc.ts
│ │ │ │ ├── ui.ts
│ │ │ │ └── worker.ts
│ │ │ └── utils/
│ │ │ ├── base.ts
│ │ │ ├── colors.ts
│ │ │ ├── config-helpers.ts
│ │ │ ├── coverage.ts
│ │ │ ├── debugger.ts
│ │ │ ├── env.ts
│ │ │ ├── environments.ts
│ │ │ ├── graph.ts
│ │ │ ├── memory-limit.ts
│ │ │ ├── modules.ts
│ │ │ ├── nativeModuleRunner.ts
│ │ │ ├── serialization.ts
│ │ │ ├── source-map.ts
│ │ │ ├── tasks.ts
│ │ │ ├── test-helpers.ts
│ │ │ ├── timers.ts
│ │ │ ├── traces.ts
│ │ │ └── workers.ts
│ │ ├── suite.d.ts
│ │ ├── suppress-warnings.cjs
│ │ ├── tsconfig.json
│ │ ├── vitest.mjs
│ │ └── worker.d.ts
│ ├── web-worker/
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ ├── package.json
│ │ ├── pure.d.ts
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── pure.ts
│ │ │ ├── runner.ts
│ │ │ ├── shared-worker.ts
│ │ │ ├── types.ts
│ │ │ ├── utils.ts
│ │ │ └── worker.ts
│ │ └── tsconfig.json
│ └── ws-client/
│ ├── package.json
│ ├── rollup.config.js
│ ├── src/
│ │ ├── index.ts
│ │ └── state.ts
│ └── tsconfig.json
├── patches/
│ ├── @sinonjs__fake-timers@15.0.0.patch
│ ├── acorn@8.11.3.patch
│ ├── cac@6.7.14.patch
│ ├── istanbul-lib-instrument.patch
│ └── istanbul-lib-source-maps.patch
├── pnpm-workspace.yaml
├── scripts/
│ ├── build-utils.js
│ ├── explain-types.ts
│ ├── publish-ci.ts
│ ├── release.ts
│ └── update-contributors.ts
├── shims.d.ts
├── test/
│ ├── README.md
│ ├── browser/
│ │ ├── README.md
│ │ ├── bundled-lib/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ ├── a.js
│ │ │ ├── b.js
│ │ │ ├── index.d.ts
│ │ │ └── index.js
│ │ ├── cjs-lib/
│ │ │ ├── index.js
│ │ │ ├── lib.d.ts
│ │ │ ├── lib.mjs
│ │ │ └── package.json
│ │ ├── custom-diff-config.ts
│ │ ├── custom-snapshot-env.ts
│ │ ├── custom-tester.html
│ │ ├── deps/
│ │ │ └── test-dep-error/
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── docker-compose.yaml
│ │ ├── fixtures/
│ │ │ ├── assertion-helper/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── benchmark/
│ │ │ │ ├── basic.bench.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── broken-iframe/
│ │ │ │ ├── submit-form.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── browser-crash/
│ │ │ │ ├── browser-crash.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── error-in-dep/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── expect-dom/
│ │ │ │ ├── setup.ts
│ │ │ │ ├── toBeChecked.test.ts
│ │ │ │ ├── toBeDisabled.test.ts
│ │ │ │ ├── toBeEmptyDOMElement.test.ts
│ │ │ │ ├── toBeInTheDocument.test.ts
│ │ │ │ ├── toBeInViewport.test.ts
│ │ │ │ ├── toBeInvalid.test.ts
│ │ │ │ ├── toBePartiallyChecked.test.ts
│ │ │ │ ├── toBeRequired.test.ts
│ │ │ │ ├── toBeVisible.test.ts
│ │ │ │ ├── toContainElement.test.ts
│ │ │ │ ├── toContainHTML.test.ts
│ │ │ │ ├── toHaveAccessibleDescription.test.ts
│ │ │ │ ├── toHaveAccessibleErrorMessage.test.ts
│ │ │ │ ├── toHaveAttribute.test.ts
│ │ │ │ ├── toHaveClass.test.ts
│ │ │ │ ├── toHaveDisplayValue.test.ts
│ │ │ │ ├── toHaveFocus.test.ts
│ │ │ │ ├── toHaveFormValues.test.ts
│ │ │ │ ├── toHaveLength.test.ts
│ │ │ │ ├── toHaveRole.test.ts
│ │ │ │ ├── toHaveSelection.test.ts
│ │ │ │ ├── toHaveStyle.test.ts
│ │ │ │ ├── toHaveTextContent.test.ts
│ │ │ │ ├── toHaveValue.test.ts
│ │ │ │ ├── toMatchScreenshot.test.ts
│ │ │ │ ├── utils.ts
│ │ │ │ └── vitest.config.js
│ │ │ ├── failing/
│ │ │ │ ├── failing.snaphot.test.ts
│ │ │ │ ├── failing.test.ts
│ │ │ │ ├── src/
│ │ │ │ │ └── error.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── insecure-context/
│ │ │ │ ├── src/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── dynamic-import.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── inspect/
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.config.with-workspace.ts
│ │ │ ├── isolate-and-setup-file/
│ │ │ │ ├── a.test.ts
│ │ │ │ ├── b.test.ts
│ │ │ │ ├── browser-setup.ts
│ │ │ │ ├── counter.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── locators/
│ │ │ │ ├── blog.test.tsx
│ │ │ │ ├── query.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── locators-custom/
│ │ │ │ ├── basic.test.tsx
│ │ │ │ └── vitest.config.ts
│ │ │ ├── mocking/
│ │ │ │ ├── automocked.test.ts
│ │ │ │ ├── autospying.test.ts
│ │ │ │ ├── import-actual-dep.test.ts
│ │ │ │ ├── import-actual-in-mock.test.ts
│ │ │ │ ├── import-actual-query.test.ts
│ │ │ │ ├── import-mock.test.ts
│ │ │ │ ├── mocked-__mocks__.test.ts
│ │ │ │ ├── mocked-do-mock-factory.test.ts
│ │ │ │ ├── mocked-factory-hoisted.test.ts
│ │ │ │ ├── mocked-factory.test.ts
│ │ │ │ ├── mocked-nested.test.ts
│ │ │ │ ├── mocking-dep.test.ts
│ │ │ │ ├── not-mocked-nested.test.ts
│ │ │ │ ├── not-mocked.test.ts
│ │ │ │ ├── service-worker.js
│ │ │ │ ├── service-worker.test.ts
│ │ │ │ ├── src/
│ │ │ │ │ ├── __mocks__/
│ │ │ │ │ │ └── mocks_calculator.ts
│ │ │ │ │ ├── actions.ts
│ │ │ │ │ ├── calculator.ts
│ │ │ │ │ ├── example.ts
│ │ │ │ │ ├── mocks_calculator.ts
│ │ │ │ │ ├── mocks_factory.ts
│ │ │ │ │ ├── mocks_factory_many.ts
│ │ │ │ │ ├── mocks_factory_many_dep1.ts
│ │ │ │ │ ├── mocks_factory_many_dep2.ts
│ │ │ │ │ ├── nested_child.ts
│ │ │ │ │ └── nested_parent.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── mocking-out-of-root/
│ │ │ │ ├── project1/
│ │ │ │ │ ├── basic.test.js
│ │ │ │ │ ├── imported-test.js
│ │ │ │ │ ├── lib.js
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── project2/
│ │ │ │ │ └── index.js
│ │ │ │ └── project3/
│ │ │ │ ├── imported-test.js
│ │ │ │ └── lib.js
│ │ │ ├── mocking-watch/
│ │ │ │ ├── 1_mocked-on-watch-change.test.ts
│ │ │ │ ├── 2_not-mocked-import.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── multiple-different-configs/
│ │ │ │ ├── basic.test.js
│ │ │ │ ├── customTester.html
│ │ │ │ └── vitest.config.js
│ │ │ ├── playwright-connect/
│ │ │ │ ├── basic.test.js
│ │ │ │ └── vitest.config.js
│ │ │ ├── print-logs/
│ │ │ │ ├── test/
│ │ │ │ │ ├── dialog.test.ts
│ │ │ │ │ └── logs.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── project-name-encoding/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── server-url/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── setup-file/
│ │ │ │ ├── browser-setup.ts
│ │ │ │ ├── module-equality.test.ts
│ │ │ │ ├── source.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── timeout/
│ │ │ │ ├── timeout.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── timeout-hooks/
│ │ │ │ ├── hooks-timeout.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── trace-mark/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── trace-view/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── failing.special.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── unhandled/
│ │ │ │ ├── throw-unhandled-error.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── unhandled-non-error/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── update-snapshot/
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ ├── basic.test.ts.snap
│ │ │ │ │ └── custom/
│ │ │ │ │ └── my_snapshot
│ │ │ │ ├── basic-fixture.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── user-event/
│ │ │ │ ├── cleanup-retry.test.ts
│ │ │ │ ├── cleanup1.test.ts
│ │ │ │ ├── cleanup2.test.ts
│ │ │ │ ├── clipboard.test.ts
│ │ │ │ ├── keyboard.test.ts
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── wheel.test.ts
│ │ │ ├── viewport/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ └── worker/
│ │ │ ├── src/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── worker-dynamic-dep.ts
│ │ │ │ └── worker.ts
│ │ │ └── vitest.config.ts
│ │ ├── injected.ts
│ │ ├── package.json
│ │ ├── settings.ts
│ │ ├── setup.unit.ts
│ │ ├── specs/
│ │ │ ├── __snapshots__/
│ │ │ │ ├── expect-element-no-awaited.test.ts.snap
│ │ │ │ └── update-snapshot.test.ts.snap
│ │ │ ├── assertion-helper.test.ts
│ │ │ ├── bail-out.test.ts
│ │ │ ├── benchmark.test.ts
│ │ │ ├── errors.test.ts
│ │ │ ├── expect-dom.test.ts
│ │ │ ├── expect-element-no-awaited.test.ts
│ │ │ ├── filter.test.ts
│ │ │ ├── fix-4686.test.ts
│ │ │ ├── insecure-context.test.ts
│ │ │ ├── inspect.test.ts
│ │ │ ├── locators.test.ts
│ │ │ ├── mocking.test.ts
│ │ │ ├── multiple-different-configs.test.ts
│ │ │ ├── playwright-connect.test.ts
│ │ │ ├── playwright-trace-mark.test.ts
│ │ │ ├── playwright-trace.test.ts
│ │ │ ├── project-name-encoding.test.ts
│ │ │ ├── runner.test.ts
│ │ │ ├── server-url.test.ts
│ │ │ ├── setup-file.test.ts
│ │ │ ├── to-match-screenshot.test.ts
│ │ │ ├── update-snapshot.test.ts
│ │ │ ├── utils.ts
│ │ │ ├── viewport.test.ts
│ │ │ └── worker.test.ts
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ └── _calculator.ts
│ │ │ ├── actions.ts
│ │ │ ├── blog-app/
│ │ │ │ └── blog.tsx
│ │ │ ├── button.css
│ │ │ ├── calculator.ts
│ │ │ ├── createNode.ts
│ │ │ ├── dynamic.ts
│ │ │ └── env.ts
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ ├── custom/
│ │ │ │ │ └── my_snapshot
│ │ │ │ ├── snapshot.test.ts.snap
│ │ │ │ └── utils.test.ts.snap
│ │ │ ├── another.test.ts
│ │ │ ├── basic.test.ts
│ │ │ ├── cdp.test-d.ts
│ │ │ ├── cdp.test.ts
│ │ │ ├── cjs-lib.test.ts
│ │ │ ├── commands.test.ts
│ │ │ ├── dom.test.ts
│ │ │ ├── dynamic-module.test.ts
│ │ │ ├── env.test.ts
│ │ │ ├── expect-element.test.ts
│ │ │ ├── findElement.test.ts
│ │ │ ├── iframe.test.ts
│ │ │ ├── injected.test.ts
│ │ │ ├── mocking.test.ts
│ │ │ ├── polyfill-lib.test.ts
│ │ │ ├── server-headers.test.ts
│ │ │ ├── snapshot.test.ts
│ │ │ ├── tags.test.ts
│ │ │ ├── timers.test.ts
│ │ │ ├── userEvent.test.ts
│ │ │ ├── utils.test.ts
│ │ │ └── viewport.test.ts
│ │ ├── tsconfig.json
│ │ ├── vitest.config-basepath.mts
│ │ ├── vitest.config.mts
│ │ └── vitest.config.unit.mts
│ ├── cli/
│ │ ├── .gitignore
│ │ ├── custom.ts
│ │ ├── deps/
│ │ │ ├── dep-invalid/
│ │ │ │ └── package.json
│ │ │ ├── dep-simple/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── dep-url/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── error/
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ ├── transpiled-inline.js
│ │ │ │ ├── transpiled-inline.ts
│ │ │ │ ├── transpiled.js
│ │ │ │ ├── transpiled.ts
│ │ │ │ └── ts.ts
│ │ │ ├── linked/
│ │ │ │ ├── index.ts
│ │ │ │ └── package.json
│ │ │ └── pkg-reporter/
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── dts/
│ │ │ ├── _shared/
│ │ │ │ ├── happy-dom-patch.ts
│ │ │ │ └── tsconfig.patch.json
│ │ │ ├── browser-playwright/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── tsconfig.json
│ │ │ │ └── vite.config.ts
│ │ │ ├── config/
│ │ │ │ ├── package.json
│ │ │ │ ├── tsconfig.json
│ │ │ │ └── vite.config.ts
│ │ │ ├── exact-optional-property/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ ├── reporter.ts
│ │ │ │ │ └── runner.ts
│ │ │ │ └── tsconfig.json
│ │ │ └── fixture-extend/
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ └── repro.ts
│ │ │ ├── tsconfig.check.json
│ │ │ └── tsconfig.json
│ │ ├── fixtures/
│ │ │ ├── assertion-helper/
│ │ │ │ └── basic.test.ts
│ │ │ ├── bail-race/
│ │ │ │ ├── a.test.ts
│ │ │ │ └── b.test.ts
│ │ │ ├── basic/
│ │ │ │ └── basic.test.ts
│ │ │ ├── benchmarking/
│ │ │ │ ├── basic/
│ │ │ │ │ ├── base.bench.ts
│ │ │ │ │ ├── mode.bench.ts
│ │ │ │ │ ├── only.bench.ts
│ │ │ │ │ ├── should-not-run.test-d.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── compare/
│ │ │ │ │ ├── basic.bench.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── reporter/
│ │ │ │ │ ├── multiple.bench.ts
│ │ │ │ │ ├── summary.bench.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ └── sequential/
│ │ │ │ ├── f1.bench.ts
│ │ │ │ ├── f2.bench.ts
│ │ │ │ ├── helper.ts
│ │ │ │ ├── setup.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── browser-init/
│ │ │ │ ├── package.json
│ │ │ │ └── vitest.config.ts
│ │ │ ├── browser-multiple/
│ │ │ │ ├── basic.test.js
│ │ │ │ ├── package.json
│ │ │ │ └── vitest.config.ts
│ │ │ ├── caching/
│ │ │ │ ├── dynamic-cache-key/
│ │ │ │ │ ├── replaced.test.js
│ │ │ │ │ ├── vitest.config.bails.js
│ │ │ │ │ ├── vitest.config.fails.js
│ │ │ │ │ └── vitest.config.passes.js
│ │ │ │ └── import-meta-glob/
│ │ │ │ ├── glob.test.js
│ │ │ │ └── vitest.config.js
│ │ │ ├── cancel-run/
│ │ │ │ ├── blocked-test-cases.test.ts
│ │ │ │ └── blocked-thread.test.ts
│ │ │ ├── config/
│ │ │ │ ├── bail/
│ │ │ │ │ ├── test/
│ │ │ │ │ │ ├── first.test.ts
│ │ │ │ │ │ └── second.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── browser-custom-html/
│ │ │ │ │ ├── browser-basic.test.ts
│ │ │ │ │ ├── browser-custom.test.ts
│ │ │ │ │ ├── custom-html.html
│ │ │ │ │ ├── vitest.config.correct.ts
│ │ │ │ │ ├── vitest.config.custom-transformIndexHtml.ts
│ │ │ │ │ ├── vitest.config.default-transformIndexHtml.ts
│ │ │ │ │ ├── vitest.config.error-hook.ts
│ │ │ │ │ └── vitest.config.non-existing.ts
│ │ │ │ ├── browser-define/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ └── watch-trigger-pattern/
│ │ │ │ ├── folder/
│ │ │ │ │ └── fs/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── text.txt
│ │ │ │ └── vitest.config.ts
│ │ │ ├── config-loader/
│ │ │ │ ├── browser/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── node/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── console/
│ │ │ │ ├── trace.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── create-vitest/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── custom-file-env/
│ │ │ │ └── custom-file-env.test.ts
│ │ │ ├── custom-pool/
│ │ │ │ ├── pool/
│ │ │ │ │ └── custom-pool.ts
│ │ │ │ ├── tests/
│ │ │ │ │ ├── custom-not-run.spec.ts
│ │ │ │ │ └── custom-run.threads.spec.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── custom-runner/
│ │ │ │ ├── custom-runner.test.ts
│ │ │ │ ├── test-runner.ts
│ │ │ │ ├── utils.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── dotted-files/
│ │ │ │ └── .cache/
│ │ │ │ └── projects/
│ │ │ │ └── test/
│ │ │ │ └── should-run.test.ts
│ │ │ ├── expect-soft/
│ │ │ │ ├── expects/
│ │ │ │ │ └── soft.test.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── fails/
│ │ │ │ ├── .dot-folder/
│ │ │ │ │ └── dot-test.test.ts
│ │ │ │ ├── async-assertion.test.ts
│ │ │ │ ├── each-timeout.test.ts
│ │ │ │ ├── empty.test.ts
│ │ │ │ ├── expect-soft.test.ts
│ │ │ │ ├── expect-unreachable.test.ts
│ │ │ │ ├── expect.test.ts
│ │ │ │ ├── exports-error.test.js
│ │ │ │ ├── hook-timeout.test.ts
│ │ │ │ ├── hooks-called.test.ts
│ │ │ │ ├── hooks-fail-afterAll.test.ts
│ │ │ │ ├── hooks-fail-afterEach.test.ts
│ │ │ │ ├── hooks-fail-beforeAll.test.ts
│ │ │ │ ├── hooks-fail-beforeEach.test.ts
│ │ │ │ ├── hooks-timeout-before-hook-cleanup-callback.test.ts
│ │ │ │ ├── mock-import-proxy-module.test.ts
│ │ │ │ ├── nested-suite.test.ts
│ │ │ │ ├── no-assertions.test.ts
│ │ │ │ ├── node-browser-context.test.ts
│ │ │ │ ├── poll-no-awaited.test.ts
│ │ │ │ ├── primitive-error.test.ts
│ │ │ │ ├── proxy-module.ts
│ │ │ │ ├── skip-conditional.test.ts
│ │ │ │ ├── snapshot-with-not.test.ts
│ │ │ │ ├── stall.test.ts
│ │ │ │ ├── test-extend/
│ │ │ │ │ ├── circular-dependency.test.ts
│ │ │ │ │ ├── fixture-error.test.ts
│ │ │ │ │ ├── fixture-rest-params.test.ts
│ │ │ │ │ ├── fixture-rest-props.test.ts
│ │ │ │ │ ├── fixture-without-destructuring.test.ts
│ │ │ │ │ ├── test-rest-params.test.ts
│ │ │ │ │ ├── test-rest-props.test.ts
│ │ │ │ │ └── test-without-destructuring.test.ts
│ │ │ │ ├── test-timeout.test.ts
│ │ │ │ ├── unhandled-suite.test.ts
│ │ │ │ ├── unhandled.test.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── file-tags/
│ │ │ │ ├── error-file-one-line-comment.test.ts
│ │ │ │ ├── error-file-tags.test.ts
│ │ │ │ ├── valid-file-one-line-comment.test.ts
│ │ │ │ └── valid-file-tags.test.ts
│ │ │ ├── forks-channel/
│ │ │ │ ├── process-send.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── git-changed/
│ │ │ │ ├── related/
│ │ │ │ │ ├── deep-related-exports.test.ts
│ │ │ │ │ ├── deep-related-imports.test.ts
│ │ │ │ │ ├── not-related.test.ts
│ │ │ │ │ ├── related.test.ts
│ │ │ │ │ ├── src/
│ │ │ │ │ │ ├── sourceA.ts
│ │ │ │ │ │ ├── sourceB.ts
│ │ │ │ │ │ ├── sourceC.ts
│ │ │ │ │ │ └── sourceD.ts
│ │ │ │ │ └── vitest.config.js
│ │ │ │ └── workspace/
│ │ │ │ ├── package.json
│ │ │ │ ├── packages/
│ │ │ │ │ ├── packageA/
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── index.test.js
│ │ │ │ │ │ └── vitest.config.mjs
│ │ │ │ │ └── packageB/
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── index.test.js
│ │ │ │ │ └── vitest.config.mjs
│ │ │ │ └── vitest.config.mjs
│ │ │ ├── global-setup/
│ │ │ │ ├── globalSetup/
│ │ │ │ │ ├── another-vite-instance.ts
│ │ │ │ │ ├── default-export.js
│ │ │ │ │ ├── named-exports.js
│ │ │ │ │ ├── server.ts
│ │ │ │ │ ├── ts-with-imports.ts
│ │ │ │ │ └── update-env.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── setupFiles/
│ │ │ │ │ ├── add-something-to-global.ts
│ │ │ │ │ └── without-relative-path-prefix.ts
│ │ │ │ └── test/
│ │ │ │ ├── global-setup.test.ts
│ │ │ │ └── setup-files.test.ts
│ │ │ ├── global-setup-fail/
│ │ │ │ ├── example.test.ts
│ │ │ │ ├── globalSetup/
│ │ │ │ │ └── error.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── inspect/
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.config.ts.timestamp-1713887058308-b154731a64b17.mjs
│ │ │ ├── invalid-package/
│ │ │ │ ├── mock-bad-dep.test.ts
│ │ │ │ ├── mock-wrapper-and-bad-dep.test.ts
│ │ │ │ ├── mock-wrapper.test.ts
│ │ │ │ └── wrapper.ts
│ │ │ ├── list/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── custom.config.ts
│ │ │ │ ├── describe-error.test.ts
│ │ │ │ ├── fail.config.ts
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── top-level-error.test.ts
│ │ │ │ ├── type.test-d.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── location-filters/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── math-with-dashes-in-name.test.ts
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── no-task-location.config.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── mocker/
│ │ │ │ ├── automock/
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── test.js
│ │ │ │ ├── autospy/
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── test.js
│ │ │ │ ├── manual-mock/
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── test.js
│ │ │ │ └── redirect/
│ │ │ │ ├── __mocks__/
│ │ │ │ │ └── test.js
│ │ │ │ ├── index.html
│ │ │ │ ├── index.js
│ │ │ │ └── test.js
│ │ │ ├── network-imports/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── public/
│ │ │ │ └── slash@3.0.0.js
│ │ │ ├── no-module-runner/
│ │ │ │ ├── jsSetup.js
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ ├── __mocks__/
│ │ │ │ │ │ └── redirect.ts
│ │ │ │ │ ├── basic.ts
│ │ │ │ │ ├── dependency.ts
│ │ │ │ │ ├── from-async.ts
│ │ │ │ │ ├── in-source/
│ │ │ │ │ │ ├── add.ts
│ │ │ │ │ │ ├── fibonacci.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── minus.ts
│ │ │ │ │ ├── mock-async.ts
│ │ │ │ │ ├── mock-js.d.ts
│ │ │ │ │ ├── mock-js.js
│ │ │ │ │ ├── mock-sync.ts
│ │ │ │ │ ├── no-mock.ts
│ │ │ │ │ ├── redirect.ts
│ │ │ │ │ └── setups.ts
│ │ │ │ ├── test/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── suite.test.ts.snap
│ │ │ │ │ ├── automock.test.ts
│ │ │ │ │ ├── autospy.test.ts
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ ├── manual-mock.test.ts
│ │ │ │ │ ├── mock-async-factory.test.ts
│ │ │ │ │ ├── redirect-mock.test.ts
│ │ │ │ │ └── suite.test.ts
│ │ │ │ ├── tsSetup.ts
│ │ │ │ ├── tsconfig.json
│ │ │ │ └── vitest.config.ts
│ │ │ ├── no-unexpected-logging/
│ │ │ │ ├── fixture-1.test.ts
│ │ │ │ ├── fixture-10.test.ts
│ │ │ │ ├── fixture-11.test.ts
│ │ │ │ ├── fixture-12.test.ts
│ │ │ │ ├── fixture-2.test.ts
│ │ │ │ ├── fixture-3.test.ts
│ │ │ │ ├── fixture-4.test.ts
│ │ │ │ ├── fixture-5.test.ts
│ │ │ │ ├── fixture-6.test.ts
│ │ │ │ ├── fixture-7.test.ts
│ │ │ │ ├── fixture-8.test.ts
│ │ │ │ └── fixture-9.test.ts
│ │ │ ├── optimize-deps/
│ │ │ │ ├── ssr.test.ts
│ │ │ │ └── web.test.ts
│ │ │ ├── otel-tests/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── otel.browser.sdk.js
│ │ │ │ ├── otel.sdk.js
│ │ │ │ └── vitest.config.ts
│ │ │ ├── path-filter/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── plugin/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── project/
│ │ │ │ ├── packages/
│ │ │ │ │ ├── project_1/
│ │ │ │ │ │ └── base.test.ts
│ │ │ │ │ ├── project_2/
│ │ │ │ │ │ └── base.test.ts
│ │ │ │ │ └── space_1/
│ │ │ │ │ └── base.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── public-api/
│ │ │ │ ├── custom.spec.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── reported-tasks/
│ │ │ │ └── 1_first.test.ts
│ │ │ ├── reporters/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── all-passing-or-skipped.test.ts
│ │ │ │ ├── all-skipped.test.ts
│ │ │ │ ├── basic/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.override.js
│ │ │ │ ├── better-testsuite-name/
│ │ │ │ │ ├── space-1/
│ │ │ │ │ │ └── test/
│ │ │ │ │ │ └── base.test.ts
│ │ │ │ │ ├── space-2/
│ │ │ │ │ │ └── test/
│ │ │ │ │ │ └── base.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── code-frame-line-limit.test.ts
│ │ │ │ ├── console-interleave.test.ts
│ │ │ │ ├── console-simple.test.ts
│ │ │ │ ├── console-some-failing.test.ts
│ │ │ │ ├── console.test.ts
│ │ │ │ ├── custom-diff-config.test.ts
│ │ │ │ ├── custom-diff-config.ts
│ │ │ │ ├── custom-error/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── default/
│ │ │ │ │ ├── a.test.ts
│ │ │ │ │ ├── b1.test.ts
│ │ │ │ │ ├── b2.test.ts
│ │ │ │ │ ├── print-index.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── duration/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── error-props/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── error-to-json.test.ts
│ │ │ │ ├── error.test.ts
│ │ │ │ ├── function-as-name.bench.ts
│ │ │ │ ├── function-as-name.test.ts
│ │ │ │ ├── github-actions/
│ │ │ │ │ └── flaky/
│ │ │ │ │ ├── math.spec.ts
│ │ │ │ │ └── network.spec.ts
│ │ │ │ ├── implementations/
│ │ │ │ │ ├── custom-reporter.js
│ │ │ │ │ └── custom-reporter.ts
│ │ │ │ ├── import-durations-25ms-throws.ts
│ │ │ │ ├── import-durations-25ms.ts
│ │ │ │ ├── import-durations-50ms.ts
│ │ │ │ ├── import-durations-throws.test.ts
│ │ │ │ ├── import-durations.test.ts
│ │ │ │ ├── indicator-position.test.js
│ │ │ │ ├── invalid-diff-config.ts
│ │ │ │ ├── json-fail-import.test.ts
│ │ │ │ ├── json-fail.test.ts
│ │ │ │ ├── junit-cli-options/
│ │ │ │ │ ├── sample.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── long-loading-task.test.ts
│ │ │ │ ├── many-errors/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── merge-errors/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── merge-reports/
│ │ │ │ │ ├── first.test.ts
│ │ │ │ │ ├── second.test.ts
│ │ │ │ │ └── vitest.config.js
│ │ │ │ ├── merge-reports-module-graph/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ ├── second.test.ts
│ │ │ │ │ ├── sub/
│ │ │ │ │ │ ├── format.ts
│ │ │ │ │ │ └── subject.ts
│ │ │ │ │ ├── util.ts
│ │ │ │ │ └── vitest.config.js
│ │ │ │ ├── metadata/
│ │ │ │ │ ├── metadata.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── ok.test.ts
│ │ │ │ ├── pass-and-skip-test-suites.test.ts
│ │ │ │ ├── project-name/
│ │ │ │ │ ├── example.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── repeats.test.ts
│ │ │ │ ├── reporter-error/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── retry.test.ts
│ │ │ │ ├── some-failing.test.ts
│ │ │ │ ├── suite-hook-failure/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── test-for-title.test.ts
│ │ │ │ ├── verbose/
│ │ │ │ │ ├── example-1.test.ts
│ │ │ │ │ └── example-2.test.ts
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── with-syntax-error.test.js
│ │ │ ├── restricted-fs/
│ │ │ │ ├── src/
│ │ │ │ │ └── math.js
│ │ │ │ ├── tests/
│ │ │ │ │ └── basic.spec.js
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.setup.js
│ │ │ ├── retry-config/
│ │ │ │ └── vitest.config.ts
│ │ │ ├── rollup-error/
│ │ │ │ ├── not-found-export.test.ts
│ │ │ │ ├── not-found-package.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── setup-files/
│ │ │ │ ├── console-setup.ts
│ │ │ │ ├── empty-setup.ts
│ │ │ │ └── empty.test.ts
│ │ │ ├── skip-note/
│ │ │ │ └── basic.test.ts
│ │ │ ├── ssr-runner/
│ │ │ │ ├── basic.test.ts
│ │ │ │ ├── test-runner.js
│ │ │ │ └── vitest.config.ts
│ │ │ ├── ssr-runner-project/
│ │ │ │ ├── project/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ ├── test-runner.js
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── stacktraces/
│ │ │ │ ├── add-in-imba.test.imba
│ │ │ │ ├── add-in-js.test.js
│ │ │ │ ├── add.test.ts
│ │ │ │ ├── error-in-deps.test.js
│ │ │ │ ├── error-in-package.test.js
│ │ │ │ ├── error-with-stack.test.js
│ │ │ │ ├── foo.js
│ │ │ │ ├── frame.spec.imba
│ │ │ │ ├── mocked-global.test.js
│ │ │ │ ├── mocked-imported.test.js
│ │ │ │ ├── mocked-imported.test.ts
│ │ │ │ ├── require-assertions.test.js
│ │ │ │ ├── reset-modules.test.ts
│ │ │ │ ├── setup.js
│ │ │ │ ├── utils.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── stacktraces-custom-helper/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── helper.ts
│ │ │ ├── standalone/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── test-tags/
│ │ │ │ └── basic.test.ts
│ │ │ ├── tty/
│ │ │ │ ├── example.test.ts
│ │ │ │ ├── example.ts
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── math.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── vitest.config.js
│ │ │ ├── vm-threads/
│ │ │ │ ├── import-external-css-assets.test.js
│ │ │ │ ├── module.test.js
│ │ │ │ ├── not-found.test.ts
│ │ │ │ ├── require-cjs.test.js
│ │ │ │ ├── src/
│ │ │ │ │ └── external/
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ └── file2.txt
│ │ │ │ │ ├── css/
│ │ │ │ │ │ ├── empty.css
│ │ │ │ │ │ ├── processed.css
│ │ │ │ │ │ └── processed.module.css
│ │ │ │ │ ├── default-cjs.cjs
│ │ │ │ │ ├── export-default-cjs.js
│ │ │ │ │ ├── export-nested-default-cjs.js
│ │ │ │ │ ├── nested-default-cjs.cjs
│ │ │ │ │ ├── not-found.js
│ │ │ │ │ ├── package-null/
│ │ │ │ │ │ └── package-null.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── primitive-cjs.cjs
│ │ │ │ └── vitest.config.ts
│ │ │ ├── watch/
│ │ │ │ ├── 42.txt
│ │ │ │ ├── example.test.ts
│ │ │ │ ├── example.ts
│ │ │ │ ├── force-watch/
│ │ │ │ │ └── trigger.js
│ │ │ │ ├── global-setup.ts
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── math.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── windows-drive-case/
│ │ │ │ └── basic.test.ts
│ │ │ └── workspace/
│ │ │ ├── api/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vite.custom.config.js
│ │ │ ├── config-empty/
│ │ │ │ └── vitest.config.js
│ │ │ ├── config-extends/
│ │ │ │ ├── repro.test.js
│ │ │ │ └── vitest.config.ts
│ │ │ ├── config-import-analysis/
│ │ │ │ ├── dep.ts
│ │ │ │ ├── packages/
│ │ │ │ │ └── a/
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── invalid-duplicate-configs/
│ │ │ │ ├── vitest.config.one.js
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.config.two.js
│ │ │ ├── invalid-duplicate-inline/
│ │ │ │ └── vitest.config.ts
│ │ │ ├── invalid-non-existing-config/
│ │ │ │ └── vitest.config.ts
│ │ │ ├── negated/
│ │ │ │ ├── packages/
│ │ │ │ │ ├── a/
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test.test.ts
│ │ │ │ │ ├── b/
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── test.test.ts
│ │ │ │ │ └── c/
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── project-1/
│ │ │ │ └── calculator-1.test.ts
│ │ │ ├── project-2/
│ │ │ │ └── calculator-2.test.ts
│ │ │ ├── several-configs/
│ │ │ │ ├── test/
│ │ │ │ │ ├── 1_test.test.ts
│ │ │ │ │ ├── 2_test.test.ts
│ │ │ │ │ ├── vitest.config.one.ts
│ │ │ │ │ └── vitest.config.two.ts
│ │ │ │ └── vitest.config.ts
│ │ │ └── several-folders/
│ │ │ ├── apps/
│ │ │ │ └── b/
│ │ │ │ ├── package.json
│ │ │ │ └── test.test.ts
│ │ │ ├── projects/
│ │ │ │ └── a/
│ │ │ │ ├── package.json
│ │ │ │ └── test.test.ts
│ │ │ └── vitest.config.ts
│ │ ├── package.json
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ ├── benchmarking.test.ts.snap
│ │ │ │ ├── fails.test.ts.snap
│ │ │ │ ├── list.test.ts.snap
│ │ │ │ ├── no-module-runner.test.ts.snap
│ │ │ │ └── stacktraces.test.ts.snap
│ │ │ ├── annotations.test.ts
│ │ │ ├── around-each.test.ts
│ │ │ ├── artifacts.test.ts
│ │ │ ├── assertion-helper.test.ts
│ │ │ ├── bail-race.test.ts
│ │ │ ├── benchmarking.test.ts
│ │ │ ├── browser-multiple.test.ts
│ │ │ ├── caching.test.ts
│ │ │ ├── cancel-run.test.ts
│ │ │ ├── concurrent.test.ts
│ │ │ ├── config/
│ │ │ │ ├── bail.test.ts
│ │ │ │ ├── browser-configs.test.ts
│ │ │ │ ├── passWithNoTests.test.ts
│ │ │ │ ├── sequence-shuffle.test.ts
│ │ │ │ └── watchTriggerPattern.test.ts
│ │ │ ├── config-loader.test.ts
│ │ │ ├── configureVitest.test.ts
│ │ │ ├── console.test.ts
│ │ │ ├── create-vitest.test.ts
│ │ │ ├── custom-pool.test.ts
│ │ │ ├── custom-runner.test.ts
│ │ │ ├── detect-async-leaks.test.ts
│ │ │ ├── dotted-files.test.ts
│ │ │ ├── expect-soft.test.ts
│ │ │ ├── expect-task.test.ts
│ │ │ ├── fails.test.ts
│ │ │ ├── fixtures/
│ │ │ │ └── reporters/
│ │ │ │ └── html/
│ │ │ │ ├── all-passing-or-skipped/
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ ├── index-BUCFJtth.js
│ │ │ │ │ │ └── index-DlhE0rqZ.css
│ │ │ │ │ └── index.html
│ │ │ │ └── fail/
│ │ │ │ ├── assets/
│ │ │ │ │ ├── index-BUCFJtth.js
│ │ │ │ │ └── index-DlhE0rqZ.css
│ │ │ │ └── index.html
│ │ │ ├── fs-cached-check.test.ts
│ │ │ ├── get-state.test.ts
│ │ │ ├── git-changed.test.ts
│ │ │ ├── global-setup.test.ts
│ │ │ ├── group-order.test.ts
│ │ │ ├── init.test.ts
│ │ │ ├── inspect.test.ts
│ │ │ ├── list-changed.test.ts
│ │ │ ├── list.test.ts
│ │ │ ├── location-filters.test.ts
│ │ │ ├── mocking.test.ts
│ │ │ ├── network-imports.test.ts
│ │ │ ├── no-module-runner.test.ts
│ │ │ ├── no-unexpected-logging.test.ts
│ │ │ ├── node-builtins.test.ts
│ │ │ ├── open-telemetry.test.ts
│ │ │ ├── optimize-deps.test.ts
│ │ │ ├── oxc.test.ts
│ │ │ ├── path-filter.test.ts
│ │ │ ├── plugin.test.ts
│ │ │ ├── print-error.test.ts
│ │ │ ├── projects.test.ts
│ │ │ ├── public-api.test.ts
│ │ │ ├── public-mocker.test.ts
│ │ │ ├── reported-tasks.test.ts
│ │ │ ├── reporters/
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ ├── default.test.ts.snap
│ │ │ │ │ ├── html.test.ts.snap
│ │ │ │ │ ├── json.test.ts.snap
│ │ │ │ │ ├── junit.test.ts.snap
│ │ │ │ │ ├── reporters.spec.ts.snap
│ │ │ │ │ └── reporters.test.ts.snap
│ │ │ │ ├── agent.test.ts
│ │ │ │ ├── code-frame-line-limit.test.ts
│ │ │ │ ├── configuration-options.test-d.ts
│ │ │ │ ├── console.test.ts
│ │ │ │ ├── custom-diff-config.test.ts
│ │ │ │ ├── custom-reporter.test.ts
│ │ │ │ ├── default.test.ts
│ │ │ │ ├── dot.test.ts
│ │ │ │ ├── error-to-json.test.ts
│ │ │ │ ├── function-as-name.test.ts
│ │ │ │ ├── github-actions.test.ts
│ │ │ │ ├── html.test.ts
│ │ │ │ ├── import-durations.test.ts
│ │ │ │ ├── indicator-position.test.ts
│ │ │ │ ├── json.test.ts
│ │ │ │ ├── junit.test.ts
│ │ │ │ ├── logger.test.ts
│ │ │ │ ├── merge-reports.test.ts
│ │ │ │ ├── reporter-error.test.ts
│ │ │ │ ├── reporters.test.ts
│ │ │ │ ├── silent.test.ts
│ │ │ │ ├── tap.test.ts
│ │ │ │ ├── test-run.test.ts
│ │ │ │ ├── tree.test.ts
│ │ │ │ ├── utils.ts
│ │ │ │ └── verbose.test.ts
│ │ │ ├── restricted-fs.test.ts
│ │ │ ├── retry-clear-mocks.test.ts
│ │ │ ├── rollup-error.test.ts
│ │ │ ├── run-custom-env.test.ts
│ │ │ ├── scoped-fixtures.test.ts
│ │ │ ├── server-url.test.ts
│ │ │ ├── setup-files.test.ts
│ │ │ ├── shared-env.test.ts
│ │ │ ├── signal.test.ts
│ │ │ ├── skip-note.test.ts
│ │ │ ├── ssr-runner.test.ts
│ │ │ ├── stacktraces.test.ts
│ │ │ ├── standalone.test.ts
│ │ │ ├── static-collect.test.ts
│ │ │ ├── test-meta.test.ts
│ │ │ ├── test-specifications.test.ts
│ │ │ ├── test-tags.test.ts
│ │ │ ├── tty.test.ts
│ │ │ ├── unhandled-ignore.test.ts
│ │ │ ├── unhandled-rejections.test.ts
│ │ │ ├── vm-threads.test.ts
│ │ │ ├── watch/
│ │ │ │ ├── change-project.test.ts
│ │ │ │ ├── config-watching.test.ts
│ │ │ │ ├── file-watching.test.ts
│ │ │ │ ├── global-setup-rerun.test.ts
│ │ │ │ ├── related.test.ts
│ │ │ │ ├── reporter-failed.test.ts
│ │ │ │ ├── stdin.test.ts
│ │ │ │ ├── stdout.test.ts
│ │ │ │ └── workspaces.test.ts
│ │ │ ├── windows-drive-case.test.ts
│ │ │ └── workers-option.test.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ ├── config/
│ │ ├── deps/
│ │ │ ├── optimizer/
│ │ │ │ ├── external/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ └── optimized/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── test-dep-conditions/
│ │ │ │ ├── false.js
│ │ │ │ ├── indirect.js
│ │ │ │ ├── inline.js
│ │ │ │ ├── package.json
│ │ │ │ └── true.js
│ │ │ ├── test-dep-conditions-indirect/
│ │ │ │ ├── false.js
│ │ │ │ ├── package.json
│ │ │ │ └── true.js
│ │ │ ├── test-dep-config/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── test-dep-virtual/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── vite-ssr-resolve/
│ │ │ ├── inline-dep/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── other-dep/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── ssr-no-external-dep/
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── fixtures/
│ │ │ ├── allowed-exec-args-fixtures/
│ │ │ │ ├── allowed-exec-argv.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── browser-no-config/
│ │ │ │ └── vitest.config.ts
│ │ │ ├── browser-persistent-context/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── cache/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── second.test.ts
│ │ │ ├── chai-config/
│ │ │ │ ├── test-each-title.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── conditions/
│ │ │ │ ├── basic.test.js
│ │ │ │ └── vite.config.ts
│ │ │ ├── conditions-pkg/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── conditions-projects/
│ │ │ │ ├── project-a/
│ │ │ │ │ ├── basic.test.js
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── project-b/
│ │ │ │ │ ├── basic.test.js
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── conditions-subpackage/
│ │ │ │ ├── custom.js
│ │ │ │ ├── default.js
│ │ │ │ ├── development.js
│ │ │ │ ├── package.json
│ │ │ │ └── production.js
│ │ │ ├── conditions-test/
│ │ │ │ ├── conditions.test.js
│ │ │ │ └── vitest.config.ts
│ │ │ ├── console/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── console-batch/
│ │ │ │ └── basic.test.ts
│ │ │ ├── console-color/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── coverage-test/
│ │ │ │ └── example.ts
│ │ │ ├── css/
│ │ │ │ ├── App.css
│ │ │ │ ├── App.module.css
│ │ │ │ ├── test/
│ │ │ │ │ ├── default-css.spec.ts
│ │ │ │ │ ├── non-scope-module.spec.ts
│ │ │ │ │ ├── process-css.spec.ts
│ │ │ │ │ ├── process-inline.spec.ts
│ │ │ │ │ ├── process-module.spec.ts
│ │ │ │ │ └── scope-module.spec.ts
│ │ │ │ └── utils.ts
│ │ │ ├── diff/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vite.config.ts
│ │ │ ├── exclude/
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── math.ts
│ │ │ │ ├── string.test.ts
│ │ │ │ ├── string.ts
│ │ │ │ └── vitest.exclude.config.ts
│ │ │ ├── exec-args-fixtures/
│ │ │ │ ├── forks.test.ts
│ │ │ │ ├── threads.test.ts
│ │ │ │ └── vmThreads.test.ts
│ │ │ ├── external/
│ │ │ │ └── dynamic/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── filters/
│ │ │ │ └── test/
│ │ │ │ ├── config.test.ts
│ │ │ │ ├── dont-run-this.test.ts
│ │ │ │ └── example.test.ts
│ │ │ ├── filters-slash/
│ │ │ │ ├── test/
│ │ │ │ │ ├── basic/
│ │ │ │ │ │ └── a.test.ts
│ │ │ │ │ ├── basic-foo/
│ │ │ │ │ │ └── a.test.ts
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── foo-basic/
│ │ │ │ │ └── a.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── fixture-no-async/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── hook-timeout/
│ │ │ │ └── basic.test.ts
│ │ │ ├── inline-setup-file/
│ │ │ │ ├── file-setup.js
│ │ │ │ ├── test.test.js
│ │ │ │ └── vitest.config.js
│ │ │ ├── mixed-environments/
│ │ │ │ ├── project/
│ │ │ │ │ └── test/
│ │ │ │ │ ├── happy-dom.test.ts
│ │ │ │ │ ├── jsdom.test.ts
│ │ │ │ │ ├── node.test.ts
│ │ │ │ │ └── workspace-project.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── mode/
│ │ │ │ ├── example.benchmark.ts
│ │ │ │ ├── example.test.ts
│ │ │ │ ├── vitest.benchmark.config.ts
│ │ │ │ └── vitest.test.config.ts
│ │ │ ├── no-browser-workspace/
│ │ │ │ └── vitest.config.ts
│ │ │ ├── no-exec-args-fixtures/
│ │ │ │ ├── no-exec-argv.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── optimizer/
│ │ │ │ └── external/
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── pool/
│ │ │ │ ├── a.test.ts
│ │ │ │ ├── b.test.ts
│ │ │ │ ├── c.test.ts
│ │ │ │ ├── print-config.test.ts
│ │ │ │ ├── print-testfiles.test.ts
│ │ │ │ └── write-to-stdout-and-stderr.test.ts
│ │ │ ├── public-config/
│ │ │ │ ├── vitest.config.ts
│ │ │ │ └── vitest.custom.config.ts
│ │ │ ├── retry/
│ │ │ │ ├── retry.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── run-mode/
│ │ │ │ ├── example.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── sequence-concurrent/
│ │ │ │ ├── sequence-concurrent-false-concurrent.test.ts
│ │ │ │ ├── sequence-concurrent-false-sequential.test.ts
│ │ │ │ ├── sequence-concurrent-true-concurrent.test.ts
│ │ │ │ └── sequence-concurrent-true-sequential.test.ts
│ │ │ ├── shard/
│ │ │ │ ├── test/
│ │ │ │ │ ├── 1.test.js
│ │ │ │ │ ├── 2.test.js
│ │ │ │ │ └── 3.test.js
│ │ │ │ └── vitest.config.js
│ │ │ ├── shard-4-files/
│ │ │ │ ├── test/
│ │ │ │ │ ├── 1.test.js
│ │ │ │ │ ├── 2.test.js
│ │ │ │ │ ├── 3.test.js
│ │ │ │ │ └── 4.test.js
│ │ │ │ └── vitest.config.js
│ │ │ ├── snapshot-path-context/
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ ├── project1/
│ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ └── project2/
│ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ ├── basic.test.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── test/
│ │ │ │ ├── example.test.ts
│ │ │ │ ├── fake-timers.test.ts
│ │ │ │ └── vitest.config.js
│ │ │ ├── vitest.config.js
│ │ │ ├── workers-option/
│ │ │ │ ├── example.test.ts
│ │ │ │ └── vitest.config.js
│ │ │ └── workspace-flags/
│ │ │ ├── projects/
│ │ │ │ ├── cli-config.test.ts
│ │ │ │ └── vitest.config.js
│ │ │ └── vitest.config.js
│ │ ├── package.json
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ ├── diff.test.ts.snap
│ │ │ │ └── hook-timeout.test.ts.snap
│ │ │ ├── browser-persistent-context.test.ts
│ │ │ ├── cache.test.ts
│ │ │ ├── chai-config.test.ts
│ │ │ ├── cli-config.test.ts
│ │ │ ├── conditions-cli.test.ts
│ │ │ ├── config-types.test-d.ts
│ │ │ ├── console-color.test.ts
│ │ │ ├── console.test.ts
│ │ │ ├── css-configs.test.ts
│ │ │ ├── diff.test.ts
│ │ │ ├── exclude.test.ts
│ │ │ ├── exec-args.test.ts
│ │ │ ├── external.test.ts
│ │ │ ├── failures.test.ts
│ │ │ ├── fixture-no-async.test.ts
│ │ │ ├── hook-timeout.test.ts
│ │ │ ├── inline-setup-file.test.ts
│ │ │ ├── mixed-environments.test.ts
│ │ │ ├── mode.test.ts
│ │ │ ├── optimizer.test.ts
│ │ │ ├── override.test.ts
│ │ │ ├── pass-empty-files.test.ts
│ │ │ ├── pool.test.ts
│ │ │ ├── public.test.ts
│ │ │ ├── retry.test.ts
│ │ │ ├── sequence-concurrent.test.ts
│ │ │ ├── shard.test.ts
│ │ │ ├── snapshot.test.ts
│ │ │ ├── testname-pattern.test.ts
│ │ │ └── vite-ssr-resolve.test.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ ├── core/
│ │ ├── __mocks__/
│ │ │ ├── @vitest/
│ │ │ │ └── test-fn.ts
│ │ │ ├── @vueuse/
│ │ │ │ └── integrations/
│ │ │ │ └── useJwt.ts
│ │ │ ├── axios/
│ │ │ │ └── index.ts
│ │ │ ├── custom-lib.ts
│ │ │ ├── extension.js.ts
│ │ │ ├── fs/
│ │ │ │ └── promises.cjs
│ │ │ ├── fs.cjs
│ │ │ ├── timers.ts
│ │ │ ├── virtual-module.ts
│ │ │ └── vscode-mocks.ts
│ │ ├── deps/
│ │ │ ├── dep-cjs/
│ │ │ │ ├── esm-comment.js
│ │ │ │ ├── esm-string.js
│ │ │ │ └── package.json
│ │ │ ├── dep-esm-non-existing/
│ │ │ │ ├── index.mjs
│ │ │ │ ├── index.mts
│ │ │ │ └── package.json
│ │ │ ├── dep-fn/
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── dep-nested-cjs/
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── dep1/
│ │ │ │ ├── esm/
│ │ │ │ │ └── index.js
│ │ │ │ └── package.json
│ │ │ └── dep2/
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── projects/
│ │ │ ├── custom-lib/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── inline-lib/
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── vite-environment-external/
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── vite-external/
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ └── submodule.ts
│ │ │ ├── aliased-mod.ts
│ │ │ ├── circularA.ts
│ │ │ ├── circularB.ts
│ │ │ ├── cjs/
│ │ │ │ ├── array-cjs.js
│ │ │ │ ├── bare-cjs.js
│ │ │ │ ├── class-cjs.js
│ │ │ │ ├── default-function.d.ts
│ │ │ │ ├── default-function.js
│ │ │ │ ├── module-cjs.ts
│ │ │ │ ├── nested-default-cjs.js
│ │ │ │ ├── primitive-cjs.js
│ │ │ │ ├── promise-export.js
│ │ │ │ └── prototype-cjs.js
│ │ │ ├── class-inheritence/
│ │ │ │ ├── bar.ts
│ │ │ │ └── foo.ts
│ │ │ ├── custom/
│ │ │ │ └── gardener.ts
│ │ │ ├── dynamic-import.ts
│ │ │ ├── env.ts
│ │ │ ├── esm/
│ │ │ │ ├── esm.js
│ │ │ │ ├── internal-esm.mjs
│ │ │ │ └── package.json
│ │ │ ├── exec.ts
│ │ │ ├── external/
│ │ │ │ ├── default-cjs.js
│ │ │ │ ├── nested-default-cjs.js
│ │ │ │ ├── package.json
│ │ │ │ ├── pkg-browser/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── ssr.js
│ │ │ │ │ └── web.js
│ │ │ │ └── pkg-node/
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── package.json
│ │ │ │ ├── ssr.js
│ │ │ │ └── web.js
│ │ │ ├── file-css.css
│ │ │ ├── file-less.less
│ │ │ ├── file-sass.sass
│ │ │ ├── file-scss.scss
│ │ │ ├── file-txt.txt
│ │ │ ├── global-mock.ts
│ │ │ ├── in-source/
│ │ │ │ ├── add.ts
│ │ │ │ ├── fibonacci.ts
│ │ │ │ └── index.ts
│ │ │ ├── mockedA.ts
│ │ │ ├── mockedB.ts
│ │ │ ├── mockedC.ts
│ │ │ ├── mockedD.ts
│ │ │ ├── mockedE.ts
│ │ │ ├── mocks/
│ │ │ │ ├── A.ts
│ │ │ │ ├── B.ts
│ │ │ │ ├── autospying-namespace/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── namespaceTarget.ts
│ │ │ │ ├── cyclic-deps/
│ │ │ │ │ ├── module-1.mjs
│ │ │ │ │ ├── module-2.mjs
│ │ │ │ │ ├── module-3.mjs
│ │ │ │ │ └── module-4.mjs
│ │ │ │ ├── default.ts
│ │ │ │ ├── dynamic-module.d.ts
│ │ │ │ ├── dynamic-module.js
│ │ │ │ ├── example.ts
│ │ │ │ ├── export-default-circle-b.ts
│ │ │ │ ├── export-default-circle-index.ts
│ │ │ │ ├── external/
│ │ │ │ │ ├── cjs-pseudoesm.cjs
│ │ │ │ │ ├── default-cjs.cjs
│ │ │ │ │ ├── default-function.cjs
│ │ │ │ │ └── external.mjs
│ │ │ │ ├── has space in path.ts
│ │ │ │ ├── integration.ts
│ │ │ │ ├── log.ts
│ │ │ │ ├── main.js
│ │ │ │ ├── moduleA.ts
│ │ │ │ ├── moduleB.ts
│ │ │ │ ├── moduleWithSymbol.ts
│ │ │ │ ├── retry-dynamic-import.ts
│ │ │ │ ├── set-foo.ts
│ │ │ │ ├── squared.js
│ │ │ │ └── test-fn-magic.ts
│ │ │ ├── module-esm.ts
│ │ │ ├── read-hello-world.ts
│ │ │ ├── relative-import.ts
│ │ │ ├── rely-on-hoisted.ts
│ │ │ ├── self/
│ │ │ │ ├── foo.ts
│ │ │ │ └── index.ts
│ │ │ ├── submodule.ts
│ │ │ ├── timeout.ts
│ │ │ ├── wasm/
│ │ │ │ ├── add.wasm
│ │ │ │ ├── wasm-bindgen/
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── index_bg.js
│ │ │ │ │ ├── index_bg.wasm
│ │ │ │ │ └── package.json
│ │ │ │ └── wasm-bindgen-no-cyclic/
│ │ │ │ ├── README.md
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── index_bg.js
│ │ │ │ ├── index_bg.wasm
│ │ │ │ ├── index_bg.wasm.d.ts
│ │ │ │ └── package.json
│ │ │ └── web-worker/
│ │ │ ├── eventListenerWorker.ts
│ │ │ ├── mock/
│ │ │ │ ├── worker-dep.ts
│ │ │ │ └── worker.ts
│ │ │ ├── objectWorker.ts
│ │ │ ├── selfWorker.ts
│ │ │ ├── selfWorkerDep.ts
│ │ │ ├── sharedWorker.ts
│ │ │ ├── worker-globals.ts
│ │ │ └── worker.ts
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ ├── injector-mock.test.ts.snap
│ │ │ │ ├── jest-expect.test.ts.snap
│ │ │ │ ├── mocked.test.ts.snap
│ │ │ │ ├── nested-suite.test.ts.snap
│ │ │ │ ├── serialize.test.ts.snap
│ │ │ │ ├── snapshot-concurrent-sync.test.ts.snap
│ │ │ │ ├── snapshot-concurrent.test.ts.snap
│ │ │ │ ├── snapshot.test.ts.snap
│ │ │ │ ├── suite.test.tsx.snap
│ │ │ │ ├── test-for-suite.test.ts.snap
│ │ │ │ └── test-for.test.ts.snap
│ │ │ ├── alias.test.ts
│ │ │ ├── basic.test.ts
│ │ │ ├── browserAutomocker.test.ts
│ │ │ ├── builtin.test.ts
│ │ │ ├── chai-style-assertions.test.ts
│ │ │ ├── chainable.test.ts
│ │ │ ├── child-specific.child_process.test.ts
│ │ │ ├── circular.test.ts
│ │ │ ├── cli-test.test.ts
│ │ │ ├── concurrent-suite.test.ts
│ │ │ ├── concurrent.spec.ts
│ │ │ ├── custom.test.ts
│ │ │ ├── date-mock.test.ts
│ │ │ ├── define-ssr.test.ts
│ │ │ ├── define-web.test.ts
│ │ │ ├── diff.test.ts
│ │ │ ├── do-mock-reset-modules.test.ts
│ │ │ ├── do-mock.test.ts
│ │ │ ├── dom-single-line-options.test.ts
│ │ │ ├── dom.test.ts
│ │ │ ├── dual-package-hazard.test.ts
│ │ │ ├── dynamic-import.test.ts
│ │ │ ├── each.test.ts
│ │ │ ├── edge.test.ts
│ │ │ ├── env-glob.test.ts
│ │ │ ├── env-jsdom.test.ts
│ │ │ ├── env-runtime.test.ts
│ │ │ ├── env.test.ts
│ │ │ ├── environments/
│ │ │ │ ├── custom-env.test.ts
│ │ │ │ ├── happy-dom.spec.ts
│ │ │ │ ├── jsdom.spec.ts
│ │ │ │ └── node.spec.ts
│ │ │ ├── error.test.ts
│ │ │ ├── esnext-decorator.test.ts
│ │ │ ├── esnext.test.ts
│ │ │ ├── execution-order.test.ts
│ │ │ ├── expect-circular.test.ts
│ │ │ ├── expect-poll.test.ts
│ │ │ ├── expect.test-d.ts
│ │ │ ├── expect.test.ts
│ │ │ ├── exports.test.ts
│ │ │ ├── external-module-directory.test.ts
│ │ │ ├── file-path.test.ts
│ │ │ ├── fixture-comments-between-destructure.test.ts
│ │ │ ├── fixture-concurrent-beforeEach.test.ts
│ │ │ ├── fixture-concurrent.test.ts
│ │ │ ├── fixture-initialization.test.ts
│ │ │ ├── fixture-options.test.ts
│ │ │ ├── fixtures/
│ │ │ │ ├── hello-mock.ts
│ │ │ │ ├── hi.txt
│ │ │ │ ├── increment-indirect.ts
│ │ │ │ ├── increment.ts
│ │ │ │ ├── mocked-dependency.ts
│ │ │ │ ├── named-overwrite-all/
│ │ │ │ │ ├── dep1.js
│ │ │ │ │ ├── dep2.js
│ │ │ │ │ └── main.js
│ │ │ │ ├── snapshot-empty.txt
│ │ │ │ ├── snapshots/
│ │ │ │ │ ├── basic/
│ │ │ │ │ │ ├── input.json
│ │ │ │ │ │ └── output.css
│ │ │ │ │ └── multiple/
│ │ │ │ │ ├── input.json
│ │ │ │ │ └── output.css
│ │ │ │ ├── timers.suite.ts
│ │ │ │ └── virtual-module-indirect.ts
│ │ │ ├── fn.test.ts
│ │ │ ├── fs.test.ts
│ │ │ ├── handled-unhandled.test.ts
│ │ │ ├── happy-dom-custom.test.ts
│ │ │ ├── happy-dom.test.ts
│ │ │ ├── hoist-import.test.ts
│ │ │ ├── hoisted-async-simple.test.ts
│ │ │ ├── hoisted-simple.test.ts
│ │ │ ├── hooks-list.test.ts
│ │ │ ├── hooks-parallel.test.ts
│ │ │ ├── hooks-stack.test.ts
│ │ │ ├── hooks.test.js
│ │ │ ├── hooks.test.ts
│ │ │ ├── immutable.test.ts
│ │ │ ├── import-client.test.ts
│ │ │ ├── import-meta-resolve.test.ts
│ │ │ ├── imports.test.ts
│ │ │ ├── injector-esm.test.ts
│ │ │ ├── injector-mock.test.ts
│ │ │ ├── inline-snap.test.ts
│ │ │ ├── inlined.test.ts
│ │ │ ├── isolate.test.ts
│ │ │ ├── jest-expect-no-url.test.ts
│ │ │ ├── jest-expect.test.ts
│ │ │ ├── jest-matcher-utils.test.ts
│ │ │ ├── jest-mock.test.ts
│ │ │ ├── local-context.test.ts
│ │ │ ├── lot-of-tests.test.ts
│ │ │ ├── math.test.ts
│ │ │ ├── memory-limit.test.ts
│ │ │ ├── mock-fs.test.ts
│ │ │ ├── mock-internals.test.ts
│ │ │ ├── mocked-circular.test.ts
│ │ │ ├── mocked-class-restore-all.test.ts
│ │ │ ├── mocked-class-restore-explicit.test.ts
│ │ │ ├── mocked-class.test.ts
│ │ │ ├── mocked-import-circular.test.ts
│ │ │ ├── mocked-no-mocks-same.test.ts
│ │ │ ├── mocked-no-mocks.test.ts
│ │ │ ├── mocked-node-module.test.ts
│ │ │ ├── mocked-public-key.test.ts
│ │ │ ├── mocked.test.js
│ │ │ ├── mocked.test.ts
│ │ │ ├── mocking/
│ │ │ │ ├── already-hoisted.test.ts
│ │ │ │ ├── automocking-class-inheritence.test.ts
│ │ │ │ ├── automocking.spec.ts
│ │ │ │ ├── autospying.test.ts
│ │ │ │ ├── axios-mocked.test.ts
│ │ │ │ ├── axios-not-mocked.test.ts
│ │ │ │ ├── circular-mocks.spec.ts
│ │ │ │ ├── custom-module-directory.spec.ts
│ │ │ │ ├── cyclic-import-actual.spec.ts
│ │ │ │ ├── cyclic-import-original.spec.ts
│ │ │ │ ├── destructured.test.ts
│ │ │ │ ├── error-mock.spec.ts
│ │ │ │ ├── external.test.ts
│ │ │ │ ├── factory.test.ts
│ │ │ │ ├── has-extension.spec.ts
│ │ │ │ ├── hoisted.test.ts
│ │ │ │ ├── integration.test.ts
│ │ │ │ ├── nested-default.spec.ts
│ │ │ │ ├── retry-dynamic-import.test.ts
│ │ │ │ ├── self-importing.test.ts
│ │ │ │ ├── spaced.spec.ts
│ │ │ │ ├── tinyspy.test.ts
│ │ │ │ ├── vi-fn.test-d.ts
│ │ │ │ ├── vi-fn.test.ts
│ │ │ │ ├── vi-mockObject.test.ts
│ │ │ │ ├── vi-spyOn.test.ts
│ │ │ │ └── virtual.test.ts
│ │ │ ├── modes.test.ts
│ │ │ ├── module-diagnostic.test.ts
│ │ │ ├── module.test.ts
│ │ │ ├── moved-snapshot.test.ts
│ │ │ ├── moved-snapshot.test.ts.snap
│ │ │ ├── named-overwrite-all.test.ts
│ │ │ ├── nested-only.test.ts
│ │ │ ├── nested-suite.test.ts
│ │ │ ├── nested-test.test.ts
│ │ │ ├── node-protocol-jsdom.spec.ts
│ │ │ ├── node-protocol-node.spec.ts
│ │ │ ├── on-failed.test.ts
│ │ │ ├── on-finished.test.ts
│ │ │ ├── only.test.ts
│ │ │ ├── parse-cjs-conditions.test.ts
│ │ │ ├── pattern.test.ts
│ │ │ ├── propagate-options-nested-suite.test.ts
│ │ │ ├── random.test.ts
│ │ │ ├── repeats.test.ts
│ │ │ ├── replace-matcher.test.ts
│ │ │ ├── require.test.ts
│ │ │ ├── resolve-file-url.test.ts
│ │ │ ├── resolve-file-url~dep.js
│ │ │ ├── resolve-ssr.test.ts
│ │ │ ├── resolve-web.test.ts
│ │ │ ├── retry-condition.test.ts
│ │ │ ├── retry-delay.test.ts
│ │ │ ├── retry-only.test.ts
│ │ │ ├── retry.test.ts
│ │ │ ├── rpc.spec.ts
│ │ │ ├── run-if.test.ts
│ │ │ ├── self.test.ts
│ │ │ ├── sequencers.test.ts
│ │ │ ├── sequential.test.ts
│ │ │ ├── serialize.test.ts
│ │ │ ├── setup.ts
│ │ │ ├── skip-reset-state.test.ts
│ │ │ ├── skip.test.ts
│ │ │ ├── snapshot-1.txt
│ │ │ ├── snapshot-2.txt
│ │ │ ├── snapshot-async.test.ts
│ │ │ ├── snapshot-concurrent-sync.test.ts
│ │ │ ├── snapshot-concurrent.test.ts
│ │ │ ├── snapshot-custom-serializer.test.ts
│ │ │ ├── snapshot-file.test.ts
│ │ │ ├── snapshot-inline-(parentheses).test.ts
│ │ │ ├── snapshot-inline.test.ts
│ │ │ ├── snapshot-react-18.test.jsx
│ │ │ ├── snapshot-react.test.jsx
│ │ │ ├── snapshot.test.ts
│ │ │ ├── snapshots-outside.ts
│ │ │ ├── sourcemap.test.ts
│ │ │ ├── spy.test.ts
│ │ │ ├── strict.test.js
│ │ │ ├── stubbed-process.test.ts
│ │ │ ├── stubs.test.ts
│ │ │ ├── suite.test.tsx
│ │ │ ├── tab-effect.spec.mjs
│ │ │ ├── task-collector.test.ts
│ │ │ ├── task-names.test.ts
│ │ │ ├── test-extend-with-top-level-hooks.test.ts
│ │ │ ├── test-extend.test.ts
│ │ │ ├── test-for-suite.test.ts
│ │ │ ├── test-for.test.ts
│ │ │ ├── test-name-pattern.test.ts
│ │ │ ├── test-options.test.ts
│ │ │ ├── test-tags-filter.test.ts
│ │ │ ├── threads-specific.threads.test.ts
│ │ │ ├── timeout.spec.ts
│ │ │ ├── timers-getMockedSystemTime.test.ts
│ │ │ ├── timers-jsdom.test.ts
│ │ │ ├── timers-node.test.ts
│ │ │ ├── timers-queueMicrotask.test.ts
│ │ │ ├── unhandled.test.ts
│ │ │ ├── unmock-import.test.ts
│ │ │ ├── url-ssr.test.ts
│ │ │ ├── url-web.test.ts
│ │ │ ├── utils-display.spec.ts
│ │ │ ├── utils.spec.ts
│ │ │ ├── vi.spec.ts
│ │ │ ├── vi.test-d.ts
│ │ │ ├── wait.test.ts
│ │ │ ├── wasm.test.ts
│ │ │ ├── web-worker-jsdom.test.ts
│ │ │ ├── web-worker-mock.test.ts
│ │ │ ├── web-worker-node.test.ts
│ │ │ └── write-file-dynamic-import.test.ts
│ │ ├── tsconfig.typecheck.json
│ │ ├── types/
│ │ │ ├── env.d.ts
│ │ │ └── vite.d.ts
│ │ ├── vite.config.ts
│ │ └── vitest-environment-custom/
│ │ ├── index.ts
│ │ └── package.json
│ ├── coverage-test/
│ │ ├── fixtures/
│ │ │ ├── configs/
│ │ │ │ ├── vitest.config.conditional.ts
│ │ │ │ ├── vitest.config.configure-vitest-hook.ts
│ │ │ │ ├── vitest.config.decorators.ts
│ │ │ │ ├── vitest.config.multi-transform.ts
│ │ │ │ ├── vitest.config.multi-transforms.ts
│ │ │ │ ├── vitest.config.query-param-transform.ts
│ │ │ │ ├── vitest.config.thresholds-auto-update.ts
│ │ │ │ ├── vitest.config.ts
│ │ │ │ ├── vitest.config.virtual-files.ts
│ │ │ │ └── vitest.config.workspace.ts
│ │ │ ├── custom-provider.ts
│ │ │ ├── custom-reporter.cjs
│ │ │ ├── setup.isolation.ts
│ │ │ ├── setup.ts
│ │ │ ├── src/
│ │ │ │ ├── .should-be-excluded-from-coverage/
│ │ │ │ │ └── excluded-from-coverage.ts
│ │ │ │ ├── Vue/
│ │ │ │ │ ├── Counter/
│ │ │ │ │ │ ├── Counter.component.ts
│ │ │ │ │ │ ├── Counter.vue
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── Defined.vue
│ │ │ │ │ ├── Hello.vue
│ │ │ │ │ └── vue.shim.d.ts
│ │ │ │ ├── another-setup.ts
│ │ │ │ ├── branch.ts
│ │ │ │ ├── circularA.ts
│ │ │ │ ├── circularB.ts
│ │ │ │ ├── cjs-dependency.ts
│ │ │ │ ├── conditional/
│ │ │ │ │ ├── ssr.ts
│ │ │ │ │ └── web.ts
│ │ │ │ ├── covered.custom-1
│ │ │ │ ├── decorators.ts
│ │ │ │ ├── dynamic-files.ts
│ │ │ │ ├── empty-lines.ts
│ │ │ │ ├── even.ts
│ │ │ │ ├── file-to-change.ts
│ │ │ │ ├── ignore-hints.ts
│ │ │ │ ├── implicit-else.ts
│ │ │ │ ├── import-meta-env.ts
│ │ │ │ ├── in-source.ts
│ │ │ │ ├── json-data-import.ts
│ │ │ │ ├── json-data.json
│ │ │ │ ├── load-outside-vite.cjs
│ │ │ │ ├── math.ts
│ │ │ │ ├── mock-target.ts
│ │ │ │ ├── multi-environment.ts
│ │ │ │ ├── multi-suite.ts
│ │ │ │ ├── pre-bundle/
│ │ │ │ │ ├── bundle.js
│ │ │ │ │ ├── bundle.ts
│ │ │ │ │ ├── first.ts
│ │ │ │ │ └── second.ts
│ │ │ │ ├── pre-transpiled/
│ │ │ │ │ ├── original.ts
│ │ │ │ │ ├── transpiled.d.ts
│ │ │ │ │ └── transpiled.js
│ │ │ │ ├── query-param-transformed.ts
│ │ │ │ ├── should-be-excluded-by-default.cts
│ │ │ │ ├── test-that-looks-like-source-file.ts
│ │ │ │ ├── tested-with-]-in-filename.ts
│ │ │ │ ├── throws-error.ts
│ │ │ │ ├── types-only.ts
│ │ │ │ ├── uncovered.custom-1
│ │ │ │ ├── untested-file.ts
│ │ │ │ ├── untested-with-]-in-filename.ts
│ │ │ │ ├── virtual-files.ts
│ │ │ │ ├── worker-wrapper.ts
│ │ │ │ └── worker.ts
│ │ │ ├── test/
│ │ │ │ ├── allow-external-fixture.test.ts
│ │ │ │ ├── circular.test.ts
│ │ │ │ ├── cjs-dependency.test.ts
│ │ │ │ ├── clean-on-rerun-fixture.test.ts
│ │ │ │ ├── custom-1-syntax.test.ts
│ │ │ │ ├── error-location.test.ts
│ │ │ │ ├── even.test.ts
│ │ │ │ ├── file-to-change.test.ts
│ │ │ │ ├── ignore-hints-fixture.test.ts
│ │ │ │ ├── import-attributes-fixture.test.ts
│ │ │ │ ├── isolation-1-fixture.test.ts
│ │ │ │ ├── isolation-2-fixture.test.ts
│ │ │ │ ├── math.test.ts
│ │ │ │ ├── merge-fixture-1.test.ts
│ │ │ │ ├── merge-fixture-2.test.ts
│ │ │ │ ├── merge-fixture-3.test.ts
│ │ │ │ ├── mock-autospy-fixture.test.ts
│ │ │ │ ├── mock-importActual-fixture.test.ts
│ │ │ │ ├── mocking-in-js-file.test.js
│ │ │ │ ├── multi-environment-fixture-ssr.test.ts
│ │ │ │ ├── multi-environment-fixture-web.test.ts
│ │ │ │ ├── multi-suite-fixture.test.ts
│ │ │ │ ├── pre-transpiled-fixture.test.ts
│ │ │ │ ├── query-param.test.ts
│ │ │ │ ├── sources-with-]-in-filenames.test.ts
│ │ │ │ ├── virtual-files-fixture.test.ts
│ │ │ │ ├── vue-fixture.test.ts
│ │ │ │ └── web-worker.test.ts
│ │ │ └── workspaces/
│ │ │ ├── custom-2/
│ │ │ │ ├── src/
│ │ │ │ │ ├── covered.custom-2
│ │ │ │ │ └── uncovered.custom-2
│ │ │ │ └── test/
│ │ │ │ └── custom-2-syntax.test.ts
│ │ │ └── project/
│ │ │ ├── project1/
│ │ │ │ ├── src/
│ │ │ │ │ ├── id.ts
│ │ │ │ │ └── untested.ts
│ │ │ │ └── test/
│ │ │ │ └── id.test.ts
│ │ │ ├── project2/
│ │ │ │ ├── src/
│ │ │ │ │ ├── konst.ts
│ │ │ │ │ └── untested.ts
│ │ │ │ └── test/
│ │ │ │ └── konst.test.ts
│ │ │ └── shared/
│ │ │ ├── src/
│ │ │ │ └── utils.ts
│ │ │ └── test/
│ │ │ └── utils.test.ts
│ │ ├── package.json
│ │ ├── setup.native.ts
│ │ ├── setup.ts
│ │ ├── test/
│ │ │ ├── allow-external.test.ts
│ │ │ ├── bundled-sources.test.ts
│ │ │ ├── changed.test.ts
│ │ │ ├── cjs-dependency.test.ts
│ │ │ ├── clean-on-rerun.test.ts
│ │ │ ├── configuration-options.test-d.ts
│ │ │ ├── custom-provider.custom.test.ts
│ │ │ ├── custom-reporter.test.ts
│ │ │ ├── decorators.test.ts
│ │ │ ├── dynamic-files.test.ts
│ │ │ ├── empty-coverage-directory.test.ts
│ │ │ ├── exclude-after-remap.test.ts
│ │ │ ├── file-outside-vite.test.ts
│ │ │ ├── ignore-hints.test.ts
│ │ │ ├── implicit-else.istanbul.test.ts
│ │ │ ├── import-attributes.test.ts
│ │ │ ├── import-meta-env.test.ts
│ │ │ ├── in-source.test.ts
│ │ │ ├── include-exclude.test.ts
│ │ │ ├── isolation.test.ts
│ │ │ ├── merge-reports.test.ts
│ │ │ ├── mixed-versions-warning.unit.test.ts
│ │ │ ├── mock-autospy.test.ts
│ │ │ ├── mock-importActual.test.ts
│ │ │ ├── mocking-in-js-file.test.ts
│ │ │ ├── multi-environment.test.ts
│ │ │ ├── multi-suite.test.ts
│ │ │ ├── on-failure.test.ts
│ │ │ ├── pre-transpiled-source.test.ts
│ │ │ ├── query-param-transforms.test.ts
│ │ │ ├── reporters.test.ts
│ │ │ ├── results-snapshot.test.ts
│ │ │ ├── run-dynamic-coverage.test.ts
│ │ │ ├── setup-files.test.ts
│ │ │ ├── shard.test.ts
│ │ │ ├── source-maps.test.ts
│ │ │ ├── temporary-files.test.ts
│ │ │ ├── test-reporter-conflicts.test.ts
│ │ │ ├── threshold-100.test.ts
│ │ │ ├── threshold-auto-update.test.ts
│ │ │ ├── threshold-auto-update.unit.test.ts
│ │ │ ├── threshold-failure.test.ts
│ │ │ ├── threshold-glob.test.ts
│ │ │ ├── transform-plugin-order.istanbul.test.ts
│ │ │ ├── virtual-files.test.ts
│ │ │ ├── vue.test.ts
│ │ │ ├── web-worker.test.ts
│ │ │ ├── workspace.multi-transform.test.ts
│ │ │ └── workspace.project-filter.test.ts
│ │ ├── tsconfig.json
│ │ ├── utils.ts
│ │ └── vitest.config.ts
│ ├── node-runner/
│ │ ├── fixtures/
│ │ │ └── globalSetup/
│ │ │ ├── basic.test.js
│ │ │ └── failing.ts
│ │ ├── package.json
│ │ └── test/
│ │ └── cli.test.js
│ ├── snapshots/
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── test/
│ │ │ ├── ci.test.ts
│ │ │ ├── compare-keys.test.ts
│ │ │ ├── custom-environment.test.ts
│ │ │ ├── custom-serializers.test.ts
│ │ │ ├── file.test.ts
│ │ │ ├── fixtures/
│ │ │ │ ├── ci/
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── compare-keys/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── custom-serializers/
│ │ │ │ │ ├── custom-serializers.test.ts
│ │ │ │ │ ├── serializer-1.js
│ │ │ │ │ ├── serializer-2.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── custom-snapshot-environment/
│ │ │ │ │ ├── snapshot-environment.ts
│ │ │ │ │ ├── test/
│ │ │ │ │ │ └── snapshots.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── file/
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ ├── snapshot-1.txt
│ │ │ │ │ └── snapshot-2.txt
│ │ │ │ ├── indent/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── inline-multiple-calls/
│ │ │ │ │ ├── different.test.ts
│ │ │ │ │ ├── different2.test.ts
│ │ │ │ │ ├── each.test.ts
│ │ │ │ │ ├── same.test.ts
│ │ │ │ │ └── same2.test.ts
│ │ │ │ ├── jest-image-snapshot/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── obsolete/
│ │ │ │ │ ├── src/
│ │ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ │ ├── test1.test.ts.snap
│ │ │ │ │ │ │ └── test2.test.ts.snap
│ │ │ │ │ │ ├── test1.test.ts
│ │ │ │ │ │ └── test2.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── skip-test/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── repro.test.ts.snap
│ │ │ │ │ ├── repro.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── skip-test-custom/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── soft/
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── soft-inline/
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── summary/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ ├── basic.test.ts
│ │ │ │ │ └── vitest.config.ts
│ │ │ │ ├── summary-removed/
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ └── basic.test.ts
│ │ │ │ ├── test-update/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ ├── retry-file.test.ts.snap
│ │ │ │ │ │ └── same-title-file.test.js.snap
│ │ │ │ │ ├── inline-concurrent.test.js
│ │ │ │ │ ├── inline.test.js
│ │ │ │ │ ├── retry-file.test.ts
│ │ │ │ │ ├── retry-inline.test.ts
│ │ │ │ │ ├── same-title-file.test.js
│ │ │ │ │ └── same-title-inline.test.js
│ │ │ │ ├── test-update-result/
│ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ ├── retry-file.test.ts.snap
│ │ │ │ │ │ └── same-title-file.test.js.snap
│ │ │ │ │ ├── inline-concurrent.test.js
│ │ │ │ │ ├── inline.test.js
│ │ │ │ │ ├── retry-file.test.ts
│ │ │ │ │ ├── retry-inline.test.ts
│ │ │ │ │ ├── same-title-file.test.js
│ │ │ │ │ └── same-title-inline.test.js
│ │ │ │ └── workspace/
│ │ │ │ ├── packages/
│ │ │ │ │ └── space/
│ │ │ │ │ ├── test/
│ │ │ │ │ │ ├── __snapshots__/
│ │ │ │ │ │ │ └── basic.test.ts.snap
│ │ │ │ │ │ └── basic.test.ts
│ │ │ │ │ └── vite.config.ts
│ │ │ │ └── vitest.config.ts
│ │ │ ├── indent.test.ts
│ │ │ ├── inline-multiple-calls.test.ts
│ │ │ ├── jest-image-snapshot.test.ts
│ │ │ ├── obsolete.test.ts
│ │ │ ├── skip-test.test.ts
│ │ │ ├── snapshots.test.ts
│ │ │ ├── soft-inline.test.ts
│ │ │ ├── soft.test.ts
│ │ │ ├── summary.test.ts
│ │ │ └── test-update.test.ts
│ │ └── vitest.config.ts
│ ├── test-utils/
│ │ ├── cli.ts
│ │ ├── fixtures/
│ │ │ └── external-math.ts
│ │ ├── index.ts
│ │ └── package.json
│ ├── tsconfig.json
│ ├── typescript/
│ │ ├── failing/
│ │ │ ├── expect-error.test-d.ts
│ │ │ ├── fail.test-d.ts
│ │ │ ├── js-fail.test-d.js
│ │ │ ├── node-types.test-d.ts
│ │ │ └── only.test-d.ts
│ │ ├── fixtures/
│ │ │ ├── dynamic-title/
│ │ │ │ ├── test/
│ │ │ │ │ └── dynamic-title.test-d.ts
│ │ │ │ ├── tsconfig.json
│ │ │ │ └── vitest.config.ts
│ │ │ └── source-error/
│ │ │ ├── src/
│ │ │ │ └── not-ok.ts
│ │ │ ├── test/
│ │ │ │ └── ok.test-d.ts
│ │ │ ├── tsconfig.json
│ │ │ └── vite.config.ts
│ │ ├── package.json
│ │ ├── test/
│ │ │ ├── __snapshots__/
│ │ │ │ └── runner.test.ts.snap
│ │ │ ├── runner.test.ts
│ │ │ ├── typecheck-error.test.ts
│ │ │ ├── typechecker.test.ts
│ │ │ ├── vitest.custom.config.ts
│ │ │ └── vitest.empty.config.ts
│ │ ├── test-d/
│ │ │ ├── expect-extend.test-d.ts
│ │ │ ├── js.test-d.js
│ │ │ ├── nested-suite1.test-d.ts
│ │ │ ├── nested-suite2.test-d.ts
│ │ │ └── test.test-d.ts
│ │ ├── tsconfig.custom.json
│ │ ├── tsconfig.empty.json
│ │ ├── tsconfig.fails.json
│ │ ├── tsconfig.json
│ │ └── vitest.config.fails.ts
│ ├── ui/
│ │ ├── .gitignore
│ │ ├── fixtures/
│ │ │ ├── annotated.test.ts
│ │ │ ├── console.test.ts
│ │ │ ├── coverage.test.ts
│ │ │ ├── coverage.ts
│ │ │ ├── error.test.ts
│ │ │ ├── example.txt
│ │ │ ├── sample.test.ts
│ │ │ ├── snapshot.test.ts
│ │ │ └── task-name.test.ts
│ │ ├── fixtures-browser/
│ │ │ └── visual-regression.test.ts
│ │ ├── package.json
│ │ ├── playwright.config.ts
│ │ ├── test/
│ │ │ ├── html-report.spec.ts
│ │ │ ├── ui-security.spec.ts
│ │ │ └── ui.spec.ts
│ │ ├── tsconfig.json
│ │ └── vitest.config.ts
│ ├── workspaces/
│ │ ├── .gitignore
│ │ ├── coverage-report-tests/
│ │ │ ├── check-coverage.test.ts
│ │ │ └── vitest.config.ts
│ │ ├── cwdPlugin.d.ts
│ │ ├── cwdPlugin.js
│ │ ├── globalTest.ts
│ │ ├── package.json
│ │ ├── space-multi-transform/
│ │ │ ├── src/
│ │ │ │ └── multi-transform.ts
│ │ │ └── test/
│ │ │ ├── project-1.test.ts
│ │ │ └── project-2.test.ts
│ │ ├── space-pools/
│ │ │ ├── forks.test.ts
│ │ │ ├── isolate.test.ts
│ │ │ ├── no-isolate.test.ts
│ │ │ └── threads.test.ts
│ │ ├── space_1/
│ │ │ ├── test/
│ │ │ │ ├── env-injected.spec.ts
│ │ │ │ ├── happy-dom.spec.ts
│ │ │ │ └── math.spec.ts
│ │ │ ├── vite.config.ts
│ │ │ └── vite.config.ts.timestamp-4345324-324424.mjs
│ │ ├── space_2/
│ │ │ └── test/
│ │ │ └── node.spec.ts
│ │ ├── space_3/
│ │ │ ├── fake-vitest/
│ │ │ │ ├── config.js
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ ├── global-provide.space-3-test.ts
│ │ │ ├── localSetup.ts
│ │ │ ├── math.space-3-test.ts
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ └── multiply.ts
│ │ │ ├── vite.config.ts
│ │ │ └── vitest.config.ts
│ │ ├── space_shared/
│ │ │ ├── setup.jsdom.ts
│ │ │ ├── setup.node.ts
│ │ │ └── test.spec.ts
│ │ ├── src/
│ │ │ └── math.ts
│ │ ├── vitest.config.ts
│ │ └── vitest.config.watch.ts
│ └── workspaces-browser/
│ ├── .gitignore
│ ├── globalTest.ts
│ ├── package.json
│ ├── space_1/
│ │ ├── test/
│ │ │ ├── math.spec.ts
│ │ │ └── node.spec.ts
│ │ ├── vite.config.ts
│ │ └── vitest.config.ts.timestamp-4345324-324424.mjs
│ ├── space_browser/
│ │ ├── test/
│ │ │ └── browser.spec.ts
│ │ └── vitest.config.ts
│ ├── space_browser_inline/
│ │ ├── test/
│ │ │ └── basic.test.ts
│ │ └── test-alias-to.ts
│ ├── src/
│ │ └── math.ts
│ └── vitest.config.ts
├── tsconfig.base.json
├── tsconfig.build.json
└── tsconfig.check.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .claude/agents/vitest-test-writer.md
================================================
---
name: vitest-test-writer
description: "Use this agent when the user needs to write comprehensive tests for Vitest features. This includes unit tests for individual functions, integration tests for CLI functionality, and browser mode tests. The agent should be invoked when implementing new features that require test coverage, fixing bugs that need regression tests, or expanding test coverage for existing functionality.\\n\\nExamples:\\n\\n<example>\\nContext: User has just implemented a new utility function in the codebase.\\nuser: \"I just added a new parseConfig function to the config package\"\\nassistant: \"I see you've added a new function. Let me use the vitest-test-writer agent to create comprehensive tests for it.\"\\n<commentary>\\nSince a new function was added, use the Task tool to launch the vitest-test-writer agent to write unit tests in test/core.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User is working on a CLI feature.\\nuser: \"Please add a --json flag to the list command\"\\nassistant: \"I'll implement the --json flag for the list command.\"\\n<function call to implement the feature>\\nassistant: \"Now let me use the vitest-test-writer agent to write integration tests for this new CLI flag.\"\\n<commentary>\\nSince a CLI feature was implemented, use the Task tool to launch the vitest-test-writer agent to write integration tests in test/cli using runInlineTests.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User wants to ensure a feature works in both normal and browser modes.\\nuser: \"Can you write tests for the new snapshot feature?\"\\nassistant: \"I'll use the vitest-test-writer agent to write comprehensive tests for the snapshot feature, covering both normal and browser modes.\"\\n<commentary>\\nSince the feature needs testing in multiple modes, use the Task tool to launch the vitest-test-writer agent to write tests in test/cli (for features supporting both modes).\\n</commentary>\\n</example>"
model: opus
color: green
---
You are an expert test engineer specializing in the Vitest testing framework. You have deep knowledge of Vitest's architecture, testing patterns, and the specific conventions used in this monorepo.
## Your Core Responsibilities
You write comprehensive, high-quality tests that follow the established patterns in this repository. You understand the distinction between unit tests, integration tests, and browser tests, and you place them in the correct locations.
## Test Location Rules
- **Unit tests**: Place in `test/core/`. These test individual functions by importing them directly, regardless of which package defines them.
- **Integration tests**: Place in `test/cli/`. These test CLI functionality and features that require running Vitest as a process.
- **Browser mode tests**: Place in `test/browser/`. However, if a feature supports both normal tests AND browser tests, place the tests in `test/cli/`.
## Testing Patterns You Must Follow
### Use runInlineTests Utility
For integration tests, always use the `runInlineTests` utility to create and run test scenarios. This utility allows you to define inline test files and validate their output.
### Snapshot Validation with toMatchInlineSnapshot
Always validate output using `toMatchInlineSnapshot()`. The snapshot is automatically generated on the first run. This is the preferred method because it:
- Captures the exact expected output
- Makes changes visible in code review
- Catches regressions precisely
### Avoid toContain
Do NOT use `toContain()` for output validation. This method fails to catch:
- Extra unexpected output
- Repeated output that shouldn't occur
- Subtle formatting differences
### Handle Dynamic Content
When output contains dynamic content (timestamps, absolute paths, durations, etc.):
1. First check `test-utils` for existing utilities that normalize this content
2. If no utility exists, manually process with `stdout.replace(regexp, 'normalized-value')`
3. Common patterns to normalize:
- Timing information (e.g., `1.234s` → `[time]`)
- Root paths (e.g., `/Users/name/project` → `<root>`)
- Process IDs or temporary file paths
### Validate Test Results with testTree or errorTree
To ensure all tests actually passed (not just that they ran), use `testTree` or `errorTree` helpers. Pass the result to `toMatchInlineSnapshot()` to verify:
- The correct number of tests ran
- Tests are organized in the expected suites
- No unexpected failures or skipped tests
## Writing Unit Tests
For unit tests in `test/core/`:
1. Import the function directly from its source package
2. Test pure functionality without process spawning
3. Cover edge cases, error conditions, and typical usage
4. Use descriptive test names that explain the scenario
## Writing Integration Tests
For integration tests in `test/cli/`:
1. Use `runInlineTests` to define test scenarios
2. Create realistic test file content
3. Validate both stderr and the test results structure
4. Test error scenarios and edge cases
5. Ensure tests are deterministic (no flaky behavior)
## Quality Standards
- Every test should have a clear purpose
- Test names should describe the behavior being verified
- Group related tests in describe blocks
- Include both positive (happy path) and negative (error) test cases
- Consider boundary conditions and edge cases
- Tests should be independent and not rely on execution order
- If you encounter a bug in the behaviour, write a **failing** test and report that there is a bug or an unexpected behaviour. If possible, delegate fixing the bug to the main agent
## Before Writing Tests
1. Read AGENTS.md for additional context and patterns
2. Look at existing tests in the target directory for style guidance
3. Identify the test utilities available in the codebase
4. Understand what behavior needs to be verified
## Output Format
When writing tests, provide:
1. The complete test file with all imports
2. Explanations of what each test verifies
3. Notes on any dynamic content normalization applied
4. Suggestions for additional test cases if relevant
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
test/cli/fixtures/reporters/indicator-position.test.js eol=crlf
================================================
FILE: .github/FUNDING.yml
================================================
github: [vitest-dev, sheremet-va, antfu, patak-dev]
open_collective: vitest
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 🐞 Bug report
description: Report an issue with Vitest
labels: [pending triage]
type: Bug
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: I am doing ... What I expect is ... What actually happening is ...
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Please provide a link to a github repository that can reproduce the problem you ran into (feel free to clone one of the [examples](https://github.com/vitest-dev/vitest/tree/main/examples)). You can also use [StackBlitz](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?initialPath=__vitest__/) if it works. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is always required no matter how easy it is to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed.
placeholder: Reproduction
validations:
required: true
- type: textarea
id: system-info
attributes:
label: System Info
description: Output of `npx envinfo --system --npmPackages '{vitest*,@vitest/*,vite,@vitejs/*,playwright,webdriverio}' --binaries --browsers`
render: shell
placeholder: System, Binaries, Browsers
validations:
required: true
- type: dropdown
id: package-manager
attributes:
label: Used Package Manager
description: Select the used package manager
options:
- npm
- yarn
- pnpm
- bun
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://vitest.dev/guide/).
required: true
- label: Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
required: true
- label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: VS Code Extension Issues
url: https://github.com/vitest-dev/vscode/issues/new/choose
about: VS Code extension related issues should be reported on the vitest-dev/vscode repository.
- name: Discord Chat
url: https://chat.vitest.dev
about: Ask questions and discuss with other Vitest users in real time.
- name: Questions & Discussions
url: https://github.com/vitest-dev/vitest/discussions
about: Use GitHub discussions for message-board style questions and discussions.
================================================
FILE: .github/ISSUE_TEMPLATE/docs.yml
================================================
name: 📚 Documentation
description: Suggest a change or new page to be added to vitest.dev
labels: [documentation]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue!
- type: checkboxes
id: documentation_is
attributes:
label: Documentation is
options:
- label: Missing
- label: Outdated
- label: Confusing
- label: Not sure?
- type: textarea
id: description
attributes:
label: Explain in Detail
description: A clear and concise description of your suggestion. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: The description of ... page is not clear. I thought it meant ... but it wasn't.
validations:
required: true
- type: textarea
id: suggestion
attributes:
label: Your Suggestion for Changes
validations:
required: true
- type: input
id: reproduction
attributes:
label: Reproduction
description: If you have a reproduction, please provide a link via [vitest.new](https://vitest.new/) or a link to a repo that can reproduce the problem you ran into.
placeholder: Reproduction URL
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: 🚀 New feature proposal
description: Propose a new feature to be added to Vitest
labels: ['enhancement: pending triage']
type: Feature
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: feature-description
attributes:
label: Clear and concise description of the problem
description: 'As a developer using Vitest I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
validations:
required: true
- type: textarea
id: suggested-solution
attributes:
label: Suggested solution
description: We could provide following implementation...
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Alternative
description: Clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Any other context or screenshots about the feature request here.
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://vitest.dev/guide/).
required: true
- label: Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
required: true
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
### Description
<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
Resolves #issue-number
<!-- You can also add additional context here -->
### Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
- [ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
- [ ] Ideally, include a test that fails without this PR but passes with it.
- [ ] Please, don't make changes to `pnpm-lock.yaml` unless you introduce a new test example.
- [ ] Please check [Allow edits by maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.
### Tests
- [ ] Run the tests with `pnpm test:ci`.
### Documentation
- [ ] If you introduce new functionality, document it. You can run documentation with `pnpm run docs` command.
### Changesets
- [ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with `feat:`, `fix:`, `perf:`, `docs:`, or `chore:`.
================================================
FILE: .github/actions/setup-and-cache/action.yml
================================================
name: Setup and cache
description: Setup for node, pnpm and cache for browser testing binaries
inputs:
node-version:
required: false
description: Node version for setup-node
default: 24.x
runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to ${{ inputs.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
================================================
FILE: .github/actions/setup-playwright/action.yml
================================================
name: Setup Playwright
description: Setup and cache Playwright browser binaries
runs:
using: composite
steps:
- name: Resolve package versions
id: resolve-package-versions
shell: bash
run: >
echo "$(
node -e "
const fs = require('fs');
const lockfile = fs.readFileSync('./pnpm-lock.yaml', 'utf8');
const pattern = (name) => new RegExp(name + ':\\\s+specifier: [\\\s\\\w\\\.^]+version: (\\\d+\\\.\\\d+\\\.\\\d+)');
const playwrightVersion = lockfile.match(pattern('playwright'))[1];
console.log('PLAYWRIGHT_VERSION=' + playwrightVersion);
"
)" >> $GITHUB_OUTPUT
- name: Print versions
shell: bash
run: echo "${{ toJson(steps.resolve-package-versions.outputs) }}"
- name: Check resolved package versions
shell: bash
if: |
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION)
run: echo "Failed to resolve package versions. See log above." && exit 1
- name: Cache Playwright v${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
uses: actions/cache@v5
id: playwright-cache
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: ${{ runner.os }}-playwright-${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install Playwright Dependencies
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps --only-shell
================================================
FILE: .github/commit-convention.md
================================================
## Git Commit Message Convention
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
### TL;DR:
Messages must be matched by the following regex:
<!-- prettier-ignore -->
```js
/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/
```
#### Examples
Appears under "Features" header, `dev` subheader:
```
feat(dev): add 'comments' option
```
Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28:
```
fix(dev): fix dev error
close #28
```
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
```
perf(build): remove 'foo' option
BREAKING CHANGE: The 'foo' option has been removed.
```
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
```
revert: feat(compiler): add 'comments' option
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
### Full Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
### Scope
The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc...
### Subject
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
================================================
FILE: .github/copilot-instructions.md
================================================
# copilot-instructions.md
This file provides guidance to Copilot Agent when working with code in this repository.
## Codebase Overview
Vitest is a next-generation testing framework powered by Vite. This is a monorepo using pnpm workspaces.
## Essential references
- Agent-specific guide: See [AGENTS.md](../AGENTS.md)
================================================
FILE: .github/renovate.json5
================================================
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", "schedule:weekly", "group:allNonMajor"],
"labels": ["dependencies"],
"rangeStrategy": "bump",
"packageRules": [
{
"groupName": "Eslint packages",
"matchPackageNames": ["/eslint/"]
},
{
"matchDepTypes": ["peerDependencies"],
"enabled": false
},
{
"matchDepTypes": ["action"],
"matchPackageNames": ["!actions/{/,}**", "!github/{/,}**"],
"pinDigests": true
}
],
"ignoreDeps": [
// manually bumping
"node",
"vite",
// we patch these packages
"@types/chai",
"@sinonjs/fake-timers",
"cac",
// Transitive dependency that we patch
"acorn",
// Keep using codemirror 5
"codemirror",
"react-18",
"react-is-18",
// webdriverio removed provenance: https://github.com/webdriverio/webdriverio/issues/14887
"webdriverio"
],
"ignorePaths": [
"**/node_modules/**"
]
}
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions: {}
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
VITEST_GENERATE_UI_TOKEN: 'true'
jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
name: 'Lint: node-latest, ubuntu-latest'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-and-cache
- name: Install
run: pnpm i
- name: Build
run: pnpm run build
- name: Generate CLI docs
run: pnpm -C docs run cli-table
# check uncommited LICENSE.md, auto-imports.d.ts, etc...
- name: Check stale build artifacts
run: git diff --exit-code
- name: Lint
run: pnpm run lint
- name: Typecheck
run: pnpm run typecheck
- name: Typecheck UI
run: pnpm run -C packages/ui typecheck:client
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -shellcheck=""
changed:
runs-on: ubuntu-latest
name: 'Diff: node-latest, ubuntu-latest'
outputs:
should_skip: ${{ steps.changed-files.outputs.only_changed == 'true' }}
steps:
- uses: actions/checkout@v6
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
with:
files: |
docs/**
.github/**
!.github/workflows/ci.yml
**.md
test:
needs: changed
name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
if: needs.changed.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest]
node_version: [20, 22, 24]
include:
- os: macos-latest
node_version: 24
- os: windows-latest
node_version: 24
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-and-cache
with:
node-version: ${{ matrix.node_version }}
- uses: browser-actions/setup-chrome@4f8e94349a351df0f048634f25fec36c3c91eded # v2.1.1
- name: Install
run: pnpm i
- uses: ./.github/actions/setup-playwright
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test:ci
- name: Test Examples
run: pnpm run test:examples
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.os }}-node-${{ matrix.node_version }}
path: test/ui/test-results/
retention-days: 30
test-cached:
needs: changed
name: 'Cache&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
if: needs.changed.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
node_version: [24]
os:
- macos-latest
- windows-latest
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-and-cache
with:
node-version: ${{ matrix.node_version }}
- uses: browser-actions/setup-chrome@4f8e94349a351df0f048634f25fec36c3c91eded # v2.1.1
- name: Install
run: pnpm i
- uses: ./.github/actions/setup-playwright
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test:ci:cache
test-browser:
needs: changed
name: 'Browsers: node-${{ matrix.node_version }}, ${{ matrix.os }}'
if: needs.changed.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [24]
os:
- macos-latest
- windows-latest
fail-fast: false
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-and-cache
with:
node-version: ${{ matrix.node_version }}
- uses: browser-actions/setup-chrome@4f8e94349a351df0f048634f25fec36c3c91eded # v2.1.1
- uses: browser-actions/setup-firefox@fcf821c621167805dd63a29662bd7cb5676c81a8 # v1.7.1
- name: Install
run: pnpm i
- uses: ./.github/actions/setup-playwright
- name: Build
run: pnpm run build
- name: Test Browser (playwright)
run: pnpm run test:browser:playwright
- name: Test Browser (webdriverio)
run: pnpm run test:browser:webdriverio
test-rolldown:
needs: changed
# macos-latest is the fastest one
name: 'Rolldown&Test: node-22, macos-latest'
if: needs.changed.outputs.should_skip != 'true'
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-and-cache
with:
node-version: 22
- uses: browser-actions/setup-chrome@4f8e94349a351df0f048634f25fec36c3c91eded # v2.1.1
- name: Install
run: |
yq -i '.overrides.vite = "npm:vite@8"' pnpm-workspace.yaml
git add . && git commit -m "ci" && pnpm i --prefer-offline --no-frozen-lockfile
- uses: ./.github/actions/setup-playwright
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test:ci:no-bail
- name: Test Examples
if: ${{ !cancelled() }}
run: pnpm run test:examples
- name: Test Browser (playwright)
if: ${{ !cancelled() }}
run: pnpm run test:browser:playwright
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-rolldown
path: rolldown/test/ui/test-results/
retention-days: 30
================================================
FILE: .github/workflows/cr.yml
================================================
name: CR
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, labeled]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
release:
if: github.repository == 'vitest-dev/vitest' && (github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'cr-tracked'))
runs-on: ubuntu-latest
name: 'Release: pkg.pr.new'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to 20
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- name: Build
run: pnpm build
env:
VITEST_GENERATE_UI_TOKEN: 'true'
VITE_TEST_WATCHER_DEBUG: 'false'
- name: Publish to StackBlitz
run: pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'
================================================
FILE: .github/workflows/ecosystem-ci-trigger.yml
================================================
name: ecosystem-ci trigger
on:
issue_comment:
types: [created]
jobs:
trigger:
runs-on: ubuntu-latest
if: github.repository == 'vitest-dev/vitest' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
permissions:
issues: write # to add / delete reactions, post comments
pull-requests: write # to read PR data, and to add labels
actions: read # to check workflow status
contents: read # to clone the repo
steps:
- uses: actions/github-script@v8
with:
script: |
const user = context.payload.sender.login
console.log(`Validate user: ${user}`)
let hasTriagePermission = false
try {
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: user,
});
hasTriagePermission = data.user.permissions.triage
} catch (e) {
console.warn(e)
}
if (hasTriagePermission) {
console.log('Allowed')
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: '+1',
})
} else {
console.log('Not allowed')
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: '-1',
})
throw new Error('not allowed')
}
- uses: actions/github-script@v8
id: get-pr-data
with:
script: |
console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`)
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
})
return {
num: context.issue.number,
branchName: pr.head.ref,
repo: pr.head.repo.full_name
}
- id: generate-token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }}
installation_retrieval_payload: '${{ github.repository_owner }}/vitest-ecosystem-ci'
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }}
- uses: actions/github-script@v8
id: trigger
env:
COMMENT: ${{ github.event.comment.body }}
PR_DATA: ${{ steps.get-pr-data.outputs.result }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
result-encoding: string
script: |
const comment = process.env.COMMENT.trim()
const prData = JSON.parse(process.env.PR_DATA)
const suite = comment.split('\n')[0].replace(/^\/ecosystem-ci run/, '').trim()
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'vitest-ecosystem-ci',
workflow_id: 'ecosystem-ci-from-pr.yml',
ref: 'main',
inputs: {
prNumber: '' + prData.num,
branchName: prData.branchName,
repo: prData.repo,
suite: suite === '' ? '-' : suite
}
})
================================================
FILE: .github/workflows/issue-close-require.yml
================================================
name: Issue Close Require
on:
schedule:
- cron: '0 0 * * *'
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write # for actions-cool/issues-helper to update issues
steps:
- name: needs reproduction
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
with:
actions: close-issues
token: ${{ secrets.GITHUB_TOKEN }}
labels: needs reproduction
inactive-day: 3
================================================
FILE: .github/workflows/issue-labeled.yml
================================================
name: Issue Labeled
on:
issues:
types: [labeled]
jobs:
reply-labeled:
runs-on: ubuntu-latest
permissions:
issues: write # for actions-cool/issues-helper to update issues
steps:
- name: needs reproduction
if: github.event.label.name == 'needs reproduction'
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
with:
actions: create-comment
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://vitest.new) (you can also use [examples](https://github.com/vitest-dev/vitest/tree/main/examples)). Issues marked with `needs reproduction` will be closed if they have no activity within 3 days.
================================================
FILE: .github/workflows/lock-closed-issues.yml
================================================
name: Lock Closed Issues
on:
schedule:
- cron: '0 0 * * *'
permissions:
issues: write
jobs:
action:
if: github.repository == 'vitest-dev/vitest'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: '14'
pr-inactive-days: '14'
issue-lock-reason: ''
pr-lock-reason: ''
process-only: issues,prs
================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish Package
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
env:
VITEST_GENERATE_UI_TOKEN: 'true'
VITE_TEST_WATCHER_DEBUG: 'false'
jobs:
publish:
if: github.repository == 'vitest-dev/vitest'
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set node version to 20
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
- name: Build
run: pnpm build
- name: Publish to npm
run: npm i -g npm@^11.5.2 && pnpm run publish-ci ${{ github.ref_name }}
- name: Generate Changelog
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .gitignore
================================================
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.cpuprofile
*.heapprofile
lib-cov
coverage
!**/integrations/coverage
node_modules
.env
.cache
dist
.idea
.vite-node
ltex*
.DS_Store
.zed
bench/test/*/*/
**/bench.json
**/browser/browser.json
docs/public/user-avatars
.eslintcache
docs/.vitepress/cache/
!test/cli/fixtures/dotted-files/**/.cache
test/**/__screenshots__/**/*
test/**/__traces__/**/*
test/browser/fixtures/update-snapshot/basic.test.ts
test/cli/fixtures/browser-multiple/basic-*
.vitest-reports
*.tsbuildinfo
# exclude static html reporter folder
test/browser/html/
test/core/html/
.vitest-attachments
explainFiles.txt
.vitest-dump
================================================
FILE: .npmrc
================================================
ignore-workspace-root-check=true
strict-peer-dependencies=false
provenance=true
shell-emulator=true
registry=https://registry.npmjs.org/
VITEST_MODULE_DIRECTORIES=/node_modules/,/packages/
================================================
FILE: .tazerc.json
================================================
{
"exclude": [
"vue",
"pretty-format"
],
"packageMode": {
"vue": "minor",
"codemirror": "minor",
"rollup": "minor"
}
}
================================================
FILE: .vscode/extensions.json
================================================
{
"recommendations": [
"vitest.explorer",
"dbaeumer.vscode-eslint"
]
}
================================================
FILE: .vscode/settings.json
================================================
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
// "eslint.rules.customizations": [
// { "rule": "style/*", "severity": "off" },
// { "rule": "*-indent", "severity": "off" },
// { "rule": "*-spacing", "severity": "off" },
// { "rule": "*-spaces", "severity": "off" },
// { "rule": "*-order", "severity": "off" },
// { "rule": "*-dangle", "severity": "off" },
// { "rule": "*-newline", "severity": "off" },
// { "rule": "*quotes", "severity": "off" },
// { "rule": "*semi", "severity": "off" }
// ],
"vitest.ignoreWorkspace": true,
"vitest.configSearchPatternInclude": "test/{core,cli,config,browser,reporters}/{vitest,vite}.{config.ts,config.unit.mts}",
"testing.automaticallyOpenTestResults": "neverOpen",
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
],
// Use the project's typescript version
"typescript.tsdk": "node_modules/typescript/lib"
}
================================================
FILE: .vscode/tasks.json
================================================
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"label": "npm: dev",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "bundes",
"endsPattern": "created"
}
}
},
{
"type": "npm",
"script": "ui:dev",
"label": "npm: ui",
"isBackground": true,
"dependsOn": ["npm: test"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "dev server running at",
"endsPattern": "ready in"
}
}
},
{
"type": "npm",
"script": "test",
"label": "npm: test",
"isBackground": true,
"dependsOn": ["npm: dev"],
"detail": "vitest -r test/core --api",
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "WATCH",
"endsPattern": "Waiting for"
}
}
},
{
"type": "npm",
"script": "ci",
"problemMatcher": [],
"label": "npm: ci"
}
]
}
================================================
FILE: AGENTS.md
================================================
# Vitest AI Agent Guide
This document provides comprehensive information for AI agents working on the Vitest codebase.
## Project Overview
Vitest is a next-generation testing framework powered by Vite. This is a monorepo using pnpm workspaces with the following key characteristics:
- **Language**: TypeScript/JavaScript (ESM-first)
- **Package Manager**: pnpm (required)
- **Node Version**: ^20.0.0 || ^22.0.0 || >=24.0.0
- **Build System**: Vite + Rollup
- **Monorepo Structure**: 15+ packages in `packages/` directory
## Setup and Development
### Initial Setup
1. Run `pnpm install` to install dependencies
2. Run `pnpm build` to build all packages
3. Install Playwright browsers when working with browser features: `npx playwright install --with-deps`
### Key Scripts
- `pnpm build` - Build all packages
- `pnpm dev` - Watch mode for development
- `pnpm lint` - Run ESLint
- `pnpm lint:fix` - Fix linting issues automatically
- `pnpm typecheck` - Run TypeScript type checking
## Testing
### Running Tests
- **All tests**: `CI=true pnpm test:ci`
- **Examples**: `CI=true pnpm test:examples`
- **Specific test suite**: `CI=true cd test/<test-folder> && pnpm test <test-file>`
- **Core directory test**: `CI=true pnpm test <test-file>` (for `test/core`)
- **Browser tests**: `CI=true pnpm test:browser:playwright` or `CI=true pnpm test:browser:webdriverio`
**IMPORTANT: Do NOT use `--` when passing test filters to pnpm.**
Using `--` causes pnpm to drop the filter, resulting in a full test run instead of a filtered one.
```bash
# WRONG - runs ALL tests (filter is ignored):
pnpm test -- basic.test.ts -t 'expect'
# CORRECT - runs only matching tests:
pnpm test basic.test.ts -t 'expect'
```
When writing tests, AVOID using `toContain` for validation. Prefer using `toMatchInlineSnapshot` to include the test error and its stack. If snapshot is failing, update the snapshot instead of reverting it to `toContain`.
If you need to typecheck tests, run `pnpm typecheck` from the root of the workspace.
### Testing Utilities
- **`runInlineTests`** from `test/test-utils/index.ts` - You must use this for complex file system setups (>1 file)
- **`runVitest`** from `test/test-utils/index.ts` - You can use this to run Vitest programmatically
- **No mocking policy** - You must never mock anything in tests
## Project Structure
### Core Packages (`packages/`)
- `vitest` - Main testing framework
- `browser` - Browser testing support
- `ui` - Web UI for test results
- `runner` - Test runner core
- `expect` - Assertion library
- `spy` - Mocking and spying utilities
- `snapshot` - Snapshot testing
- `coverage-v8` / `coverage-istanbul` - Code coverage
- `utils` - Shared utilities
- `mocker` - Module mocking
### Test Organization (`test/`)
- `test/core` - Core functionality tests
- `test/browser` - Browser-specific tests
- Various test suites organized by feature
### Important Directories
- `docs/` - Documentation (Vite-powered)
- `examples/` - Example projects and integrations
- `scripts/` - Build and development scripts
- `.github/` - GitHub Actions workflows
- `patches/` - Package patches via pnpm
## Code Style and Conventions
### Formatting and Linting
- **Always run** `pnpm lint:fix` after making changes
- Fix non-auto-fixable errors manually
### TypeScript
- Strict TypeScript configuration
- Use `pnpm typecheck` to verify types
- Configuration files: `tsconfig.base.json`, `tsconfig.build.json`, `tsconfig.check.json`
### Code Quality
- ESM-first approach
- Follow existing patterns in the codebase
- Use utilities from `@vitest/utils/*` when available. Never import from `@vitest/utils` main entry point directly.
- Do not add comments explaining what the line does unless prompted to.
## Common Workflows
### Adding New Features
1. Identify the appropriate package in `packages/`
2. Follow existing code patterns
3. Add tests using testing utilities
4. Run `pnpm build && pnpm typecheck && pnpm lint:fix`
5. Add tests with relevant test suites
### Debugging
- Use VS Code: `⇧⌘B` (Shift+Cmd+B) or `Ctrl+Shift+B` for dev tasks
- Check `scripts/` directory for specialized development tools
### Documentation
- Main docs in `docs/` directory
- Built with `pnpm docs:build`
- Local dev server: `pnpm docs`
- When adding cli options, run `pnpm -C docs run cli-table` to update the cli-generated.md file
## Dependencies and Tools
### Key Dependencies
- **Vite** - Build tool and dev server
- **Rollup** - Bundler
- **ESLint** - Linting
- **TypeScript** - Type checking
- **Playwright** - Browser testing
- **Chai/Expect** - Assertions
- **Tinypool** - Worker threading
- **Tinybench** - Benchmarking
### Development Tools
- **tsx** - TypeScript execution
- **ni/nr** - Package manager abstraction
- **bumpp** - Version bumping
- **changelogithub** - Changelog generation
## Browser Testing
- Two modes: Playwright and WebDriverIO
- Separate test commands for each
- Component testing supported (Vue, React, Svelte, Lit, Marko)
## Performance Considerations
- This is a performance-critical testing framework
- Pay attention to import costs and bundle size
- Use lazy loading where appropriate
- Consider worker thread implications
## Troubleshooting
### Common Issues
- Ensure pnpm is used (not npm/yarn)
- Build before running tests
- Check Node.js version compatibility
- Playwright browsers must be installed for browser tests
### Getting Help
- Check existing issues and documentation
- Review CONTRIBUTING.md for detailed guidelines
- Follow patterns in existing code
================================================
FILE: CLAUDE.md
================================================
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Codebase Overview
Vitest is a next-generation testing framework powered by Vite. This is a monorepo using pnpm workspaces.
## Essential references
- Agent-specific guide: See [AGENTS.md](AGENTS.md)
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code Of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, political party, or sexual identity and orientation. Note, however, that religion, political party, or other ideological affiliation provide no exemptions for the behavior we outline as unacceptable in this Code of Conduct.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by sending an e-mail to vitest.dev@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
================================================
FILE: CONTRIBUTING.md
================================================
# Vitest Contributing Guide
Hi! We are really excited that you are interested in contributing to Vitest. Before submitting your contribution, please make sure to take a moment and read through the following guide:
## Repo Setup
The Vitest repo is a monorepo using pnpm workspaces. The package manager used to install and link dependencies must be [pnpm](https://pnpm.io/).
We recommend installing [ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier:
- `ni` is equivalent to `pnpm install`
- `nr test` is equivalent to `pnpm run test`
To develop and test `vitest` package:
1. Run `pnpm install` in `vitest`'s root folder
2. Run `pnpm run build` to build all monorepo packages
- after this, you can use `pnpm run dev` to rebuild packages as you modify code
3. Run
- `pnpm run test` to run core tests
- `pnpm run test:ci` to run all the suite
- `cd test/(dir) && pnpm run test` to run a specific test suite
> 💡 If you use VS Code, you can hit `⇧ ⌘ B` or `Ctrl + Shift + B` to launch all the necessary dev tasks.
### UI Development
If you want to improve Vitest Browser Mode, see the [Browser Mode development guide](./packages/ui/README.md) for setup instructions and development workflow.
## Debugging
### VS Code
If you want to use break point and explore code execution you can use the ["Run and debug"](https://code.visualstudio.com/docs/debugtest/debugging) feature from vscode.
1. Add a `debugger` statement where you want to stop the code execution.
2. Click on the "Run and Debug" icon in the activity bar of the editor.
3. Click on the "Javascript Debug Terminal" button.
4. It will open a terminal, then type the test command: `pnpm run test`
5. The execution will stop and you'll use the [Debug toolbar](https://code.visualstudio.com/docs/debugtest/debugging#_debug-actions) to continue, step over, restart the process...
## Testing Vitest against external packages
You may wish to test your locally-modified copy of Vitest against another package that is using it. For pnpm, after building Vitest, you can use [`pnpm.overrides`](https://pnpm.io/9.x/package_json#pnpmoverrides). Please note that `pnpm.overrides` must be specified in the root `package.json` and you must first list the package as a dependency in the root `package.json`:
```json
{
"dependencies": {
"vitest": "*"
},
"pnpm": {
"overrides": {
"vitest": "link:../path/to/vitest/packages/vitest"
}
}
}
```
And re-run `pnpm install` to link the package.
Add a `.npmrc` file with following line next to the `package.json`:
```sh
VITEST_MODULE_DIRECTORIES=/node_modules/,/packages/
```
## Pull Request Guidelines
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- If adding a new feature:
- Add accompanying test case.
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- When adding cli options, run `pnpm -C docs run cli-table` to update the cli-generated.md file
- If fixing bug:
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `fix: update entities encoding/decoding (fix #3899)`.
- Provide a detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Make sure tests pass!
- Commit messages must follow the [commit message convention](./.github/commit-convention.md) so that changelogs can be automatically generated.
- Use `pnpm run lint:fix` to format files according to the project guidelines.
## Maintenance Guidelines
> The following section is mostly for maintainers who have commit access, but it's helpful to go through if you intend to make non-trivial contributions to the codebase.
### Issue Triaging Workflow
```mermaid
flowchart TD
start{Followed issue<br/>template?}
start --NO--> close1[Close and ask to<br/>follow template]
start --YES--> dupe{Is duplicate?}
dupe --YES--> close2[Close and point<br/>to duplicate]
dupe --NO--> repro{Has proper<br/>reproduction?}
repro --NO--> close3[Label: 'needs reproduction'<br/>bot will auto close if no update has been made in 3 days]
repro --YES--> real{Is actually a bug?}
real --NO--> intended{Is the intended<br/>behaviour?}
intended --YES--> explain[Explain and close<br/>point to docs if needed]
intended --NO--> open[Keep open for discussion<br/>Remove 'pending triage' label]
real --YES--> real2["1. Remove 'pending triage' label<br/>2. Add related feature label if<br/>applicable (e.g. 'feat: browser')<br/>3. Add priority and meta labels (see below)"]
real2 --> unusable{Does the<br/>bug make Vitest<br/>unusable?}
unusable --YES--> maj{Does the bug<br/>affect the majority<br/>of Vitest users?}
maj --YES--> p5[p5: urgent]
maj --NO--> p4[p4: important]
unusable --NO--> workarounds{Are there<br/>workarounds for<br/>the bug?}
workarounds --YES--> p2[p2: edge case<br/>has workaround]
workarounds --NO--> p3[p3: minor bug]
```
### Pull Request Review Workflow
```mermaid
flowchart TD
start{Bug fix<br/>or<br/>feature}
start --BUG FIX--> strict_bug{"Is a 'strict fix'<br/>i.e. fixes an obvious<br/>oversight with no<br/>side effects"}
start --FEATURE--> feature[- Discuss feature necessity<br/>- Is this the best way to address the need<br/>- Review code quality<br/>- Add feature labels<br/>- Approve if you feel strongly<br/>that the feature is needed]
feature --> merge
strict_bug --YES--> strict[- Verify the fix locally<br/>- Review code quality<br/>- Require test case if applicable<br/>- Request changes if necessary]
strict_bug --NO--> non_strict[- Discuss the potential side<br/>effects of the fix, e.g.<br/>- Could it introduce implicit<br/>behavior changes in other<br/>cases?<br/>- Does it introduce too much<br/>changes?]
non_strict --> label["Add priority labels<br/>(see issue triaging workflow)"]
strict --> label
label --> approve
approve --> merge["Merge if approved by 2 or<br/>more team members<br/>- Use 'Squash and Merge'<br/>- Edit commit message to follow convention<br/>- In commit message body, list relevant issues being fixed<br/>e.g. 'fix #1234, fix #1235'"]
```
## Notes on Dependencies
Vitest aims to be lightweight, and this includes being aware of the number of npm dependencies and their size.
### Think before adding a dependency
Most deps should be added to `devDependencies` even if they are needed at runtime. Some exceptions are:
- Type packages. Example: `@types/*`.
- Deps that cannot be properly bundled due to binary files.
- Deps that ships its own types and its type is used in vitest's own public types.
Avoid deps that has large transitive dependencies that results in bloated size compared to the functionality it provides.
If there are libraries that are needed and don't comply with our size
requirements, a fork can be tried to reduce its size while we work with them to
upstream our changes.
### Think before adding yet another option
We already have many config options, and we should avoid fixing an issue by adding yet another one. Before adding an option, try to think about:
- Whether the problem is really worth addressing
- Whether the problem can be fixed with a smarter default
- Whether the problem has workaround using existing options
- Whether the problem can be addressed with a plugin instead
================================================
FILE: FUNDING.json
================================================
{
"drips": {
"ethereum": {
"ownedBy": "0x929Eb10Cf1621b26199120a521C785F8271e0b78"
}
}
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2021-Present VoidZero Inc. and Vitest contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<br>
<br>
<a href="https://vitest.dev" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://vitest.dev/vitest-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://vitest.dev/vitest-dark.svg">
<img alt="Vitest logo" src="https://vitest.dev/vitest-dark.svg" height="60">
</picture>
</a>
<br>
<br>
<br>
</p>
<h1 align="center">
Vitest
</h1>
<p align="center">
Next generation testing framework powered by Vite.
<p>
<p align="center">
<a href="https://npmx.dev/package/vitest"><img src="https://img.shields.io/npm/v/vitest?color=729B1B&label=" alt="current vitest version badge"></a>
<p>
<p align="center">
<a href="https://chat.vitest.dev"><b>Get involved!</b></a>
</p>
<p align="center">
<a href="https://vitest.dev">Documentation</a> | <a href="https://vitest.dev/guide/">Getting Started</a> | <a href="https://vitest.dev/guide/#examples">Examples</a> | <a href="https://vitest.dev/guide/why">Why Vitest?</a>
</p>
<p align="center">
<a href="https://cn.vitest.dev">中文文档</a>
</p>
<h4 align="center">
</h4>
<br>
<br>
## Features
- [Vite](https://vitejs.dev/)'s config, transformers, resolvers, and plugins. Use the same setup from your app!
- [Jest Snapshot](https://jestjs.io/docs/snapshot-testing)
- [Chai](https://www.chaijs.com/) built-in for assertions, with [Jest expect](https://jestjs.io/docs/expect) compatible APIs
- [Smart & instant watch mode](https://vitest.dev/guide/features.html#watch-mode), like HMR for tests!
- [Native code coverage](https://vitest.dev/guide/features.html#coverage) via [`v8`](https://v8.dev/blog/javascript-code-coverage) or [`istanbul`](https://istanbul.js.org/).
- [Tinyspy](https://github.com/tinylibs/tinyspy) built-in for mocking, stubbing, and spies.
- [JSDOM](https://github.com/jsdom/jsdom) and [happy-dom](https://github.com/capricorn86/happy-dom) for DOM and browser API mocking
- [Browser Mode](https://vitest.dev/guide/browser/) for running component tests in the browser
- Components testing ([Vue](https://github.com/vitest-tests/browser-examples/tree/main/examples/vue), [React](https://github.com/vitest-tests/browser-examples/tree/main/examples/react), [Svelte](https://github.com/vitest-tests/browser-examples/tree/main/examples/svelte), [Lit](./examples/lit), [Marko](https://github.com/marko-js/examples/tree/master/examples/library-ts))
- Benchmarking support with [Tinybench](https://github.com/tinylibs/tinybench)
- [Projects](https://vitest.dev/guide/projects) support
- [expect-type](https://github.com/mmkal/expect-type) for type-level testing
- ESM first, top level await
- Out-of-box TypeScript / JSX support
- Filtering, timeouts, concurrent for suite and tests
- Sharding support
- Reporting Uncaught Errors
- Run your tests in the browser natively
> Vitest requires Vite >=v6.0.0 and Node >=v20.0.0
```ts
import { assert, describe, expect, it } from 'vitest'
describe('suite name', () => {
it('foo', () => {
expect(1 + 1).toEqual(2)
expect(true).to.be.true
})
it('bar', () => {
assert.equal(Math.sqrt(4), 2)
})
it('snapshot', () => {
expect({ foo: 'bar' }).toMatchSnapshot()
})
})
```
```bash
$ npx vitest
```
## Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg' alt="vitest's sponsors"/>
</a>
</p>
### Vladimir Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg' alt="vladimir's sponsors"/>
</a>
</p>
### Anthony Fu Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg' alt="anthony's sponsors"/>
</a>
</p>
### Patak Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg' alt="patak's sponsors"/>
</a>
</p>
## Credits
Thanks to:
- [The Jest team and community](https://jestjs.io/) for creating a delightful testing API
- [@lukeed](https://github.com/lukeed) for the work on [uvu](https://github.com/lukeed/uvu) where we are inspired a lot from.
- [@pi0](https://github.com/pi0) for the idea and implementation of using Vite to transform and bundle the server code.
- [The Vite team](https://github.com/vitejs/vite) for brainstorming the initial idea.
- [@patak-dev](https://github.com/patak-dev) for the awesome package name!
## Contribution
See [Contributing Guide](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
## License
[MIT](./LICENSE) License © 2021-Present VoidZero Inc. and Vitest contributors
================================================
FILE: SECURITY.md
================================================
# Reporting a Vulnerability
To report a vulnerability, please open a private vulnerability report at https://github.com/vitest-dev/vitest/security.
While the discovery of new vulnerabilities is rare, we also recommend always using the latest versions of Vitest to ensure your application remains as secure as possible.
================================================
FILE: docs/.vitepress/blog.data.ts
================================================
import { createContentLoader } from 'vitepress'
interface Post {
title: string
url: string
date: {
time: number
string: string
}
}
declare const data: Post[]
export { data }
export default createContentLoader('blog/*.md', {
// excerpt: true,
transform(raw): Post[] {
return raw
.map(({ url, frontmatter }) => ({
title: frontmatter.head.find((e: any) => e[1].property === 'og:title')[1]
.content,
url,
date: formatDate(frontmatter.date),
}))
.sort((a, b) => b.date.time - a.date.time)
},
})
function formatDate(raw: string): Post['date'] {
const date = new Date(raw)
date.setUTCHours(12)
return {
time: +date,
string: date.toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
}),
}
}
================================================
FILE: docs/.vitepress/components/Advanced.vue
================================================
<template>
<Badge type="danger" title="This is an advanced API intended for library authors and framework integrations. Most users should not need this." class="advanced-badge">
advanced
</Badge>
</template>
<style scoped>
.advanced-badge {
cursor: help;
}
</style>
================================================
FILE: docs/.vitepress/components/ArrowDown.vue
================================================
<template>
<span class="arrow-down">
<span class="arrow-line" />
<span class="arrow-head" />
</span>
</template>
<style scoped>
.arrow-down {
display: flex;
flex-direction: column;
align-items: center;
}
.arrow-line {
height: 1rem;
width: 0.2rem;
background-color: var(--vp-c-brand-1);
}
.arrow-head {
height: 1rem;
width: 1rem;
background-color: var(--vp-c-brand-1);
clip-path: polygon(100% 0, 0 0, 50% 100%);
}
</style>
================================================
FILE: docs/.vitepress/components/BlogIndex.vue
================================================
<script setup lang="ts">
import { data as posts } from '../blog.data'
function getDateTime(time: number) {
return new Date(time).toISOString()
}
</script>
<template>
<ul class="blog-list">
<li v-for="post of posts" :key="post.url" class="blog-entry">
<article>
<time :datetime="getDateTime(post.date.time)">{{
post.date.string
}}</time>
<h2 class="title">
<a :href="post.url">{{ post.title }}</a>
</h2>
</article>
</li>
</ul>
</template>
<style scoped>
.blog-list {
list-style-type: none;
padding: 0;
}
.blog-entry {
margin-top: 3em;
border-bottom: 1px solid var(--vp-c-divider);
}
.blog-entry time {
font-size: 14px;
}
.title {
border: none;
margin-top: 0;
padding-top: 0;
font-size: 22px;
}
.title a {
font-weight: 600;
text-decoration: none;
}
</style>
================================================
FILE: docs/.vitepress/components/Box.vue
================================================
<template>
<span class="box">
<slot />
</span>
</template>
<style scoped>
.box {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
text-align: center;
border: 0.1rem solid var(--vp-c-brand-1);
border-radius: 15px;
padding: 1rem 2rem;
}
</style>
================================================
FILE: docs/.vitepress/components/CRoot.vue
================================================
<script setup>
import { Icon } from '@iconify/vue'
</script>
<template>
<Badge type="warning" title="This options is only available in the top level config. You cannot specify it as an option of a test project." class="croot-badge">
<Icon icon="carbon:document-configuration" class="croot-icon" />
</Badge>
</template>
<style scoped>
.croot-badge {
text-decoration: underline;
text-decoration-style: dotted;
cursor: help;
}
.croot-icon {
margin-top: 0.25rem;
margin-bottom: 0.25rem;
margin-left: -0.25rem;
margin-right: -0.25rem;
}
</style>
================================================
FILE: docs/.vitepress/components/CourseLink.vue
================================================
<script setup lang="ts">
import { Icon } from '@iconify/vue'
defineProps<{
href: string
}>()
</script>
<template>
<a :href="href" target="_blank" class="course-link">
<Icon icon="carbon:play-filled" class="course-icon" />
<slot />
</a>
</template>
<style scoped>
.course-link {
background-color: rgb(34 197 94 / 0.1);
padding: 0.75rem 1rem;
border-radius: 0.25rem;
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
}
.course-icon {
flex: none;
font-size: 1.125rem;
}
</style>
================================================
FILE: docs/.vitepress/components/Deprecated.vue
================================================
<template>
<Badge type="danger">
deprecated
</Badge>
</template>
================================================
FILE: docs/.vitepress/components/Experimental.vue
================================================
<template>
<Badge type="warning" title="This feature is experimental and does not follow SemVer." class="experimental-badge">
experimental
</Badge>
</template>
<style scoped>
.experimental-badge {
cursor: help;
}
</style>
================================================
FILE: docs/.vitepress/components/FeaturesList.vue
================================================
<script setup>
import ListItem from './ListItem.vue'
</script>
<template>
<ul
class="features-list"
dir="auto"
>
<ListItem><a target="_blank" href="https://vitejs.dev" rel="noopener noreferrer">Vite</a>'s config, transformers, resolvers, and plugins</ListItem>
<ListItem>Use the same setup from your app to run the tests!</ListItem>
<ListItem>Smart & instant watch mode, like HMR for tests!</ListItem>
<ListItem>Component testing for Vue, React, Svelte, Lit, Marko and more</ListItem>
<ListItem>Out-of-the-box TypeScript / JSX support</ListItem>
<ListItem>ESM first, top level await</ListItem>
<ListItem>Benchmarking support with <a target="_blank" href="https://github.com/tinylibs/tinybench" rel="noopener noreferrer">Tinybench</a></ListItem>
<ListItem>Filtering, timeouts, concurrent for suite and tests</ListItem>
<ListItem><a href="/guide/projects">Projects</a> support</ListItem>
<ListItem>
<a href="/guide/snapshot">
Jest-compatible Snapshot
</a>
</ListItem>
<ListItem><a target="_blank" href="https://www.chaijs.com/" rel="noopener noreferrer">Chai</a> built-in for assertions + <a target="_blank" href="https://jestjs.io/docs/expect" rel="noopener noreferrer">Jest expect</a> compatible APIs</ListItem>
<ListItem><a target="_blank" href="https://github.com/tinylibs/tinyspy" rel="noopener noreferrer">Tinyspy</a> built-in for mocking</ListItem>
<ListItem><a target="_blank" href="https://github.com/capricorn86/happy-dom" rel="noopener noreferrer">happy-dom</a> or <a target="_blank" href="https://github.com/jsdom/jsdom" rel="noopener noreferrer">jsdom</a> for DOM mocking</ListItem>
<ListItem><a href="https://vitest.dev/guide/browser/" rel="noopener noreferrer">Browser Mode</a> for running component tests in the browser</ListItem>
<ListItem>Code coverage via <a target="_blank" href="https://v8.dev/blog/javascript-code-coverage" rel="noopener noreferrer">v8</a> or <a target="_blank" href="https://istanbul.js.org/" rel="noopener noreferrer">istanbul</a></ListItem>
<ListItem>Rust-like <a href="/guide/in-source">in-source testing</a></ListItem>
<ListItem>Type Testing via <a target="_blank" href="https://github.com/mmkal/expect-type" rel="noopener noreferrer">expect-type</a></ListItem>
<ListItem>Sharding Support</ListItem>
<ListItem>Reporting Uncaught Errors</ListItem>
</ul>
</template>
<style>
.features-list li {
list-style: none;
display: flex;
gap: 0.4rem;
margin: 0;
}
.features-list {
padding: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
</style>
================================================
FILE: docs/.vitepress/components/HomePage.vue
================================================
<script setup lang="ts">
import { VPHomeSponsors } from '@voidzero-dev/vitepress-theme'
import { sponsors } from '../sponsors'
</script>
<template>
<div class="content">
<div class="content-container">
<main class="main">
<VPHomeSponsors
v-if="sponsors"
message="Vitest is free and open source, made possible by wonderful sponsors."
:data="sponsors"
/>
<div class="action">
<a
class="sponsor"
href="https://github.com/sponsors/vitest-dev"
target="_blank"
rel="noreferrer"
>
Sponsor Vitest
</a>
</div>
<p flex flex-col items-center mt-10 class="text-center opacity-75">
<a href="https://www.netlify.com" rel="noopener noreferrer">
<img src="/netlify.svg" alt="Deploys by Netlify" width="114" height="151" decoding="async">
</a>
</p>
</main>
</div>
</div>
</template>
<style scoped>
.action {
display: flex;
justify-content: center;
gap: 1rem;
padding-top: 4rem;
}
.sponsor {
/* .VPButton */
display: inline-block;
border: 1px solid transparent;
text-align: center;
font-weight: 600;
white-space: nowrap;
transition:
color 0.25s,
border-color 0.25s,
background-color 0.25s;
/* .VPButton.medium */
border-radius: 20px;
padding: 0 20px;
line-height: 38px;
font-size: 14px;
/* .VPButton.sponsor */
border-color: var(--vp-button-sponsor-border);
color: var(--vp-button-sponsor-text);
background-color: var(--vp-button-sponsor-bg);
}
.sponsor:hover {
/* .VPButton.sponsor:hover */
border-color: var(--vp-button-sponsor-hover-border);
color: var(--vp-button-sponsor-hover-text);
background-color: var(--vp-button-sponsor-hover-bg);
}
</style>
================================================
FILE: docs/.vitepress/components/ListItem.vue
================================================
<script setup lang="ts">
import { Icon } from '@iconify/vue'
import { until, useElementVisibility } from '@vueuse/core'
import { computed, effectScope, onMounted, ref } from 'vue'
const el = ref<HTMLDivElement>()
const state = ref(0)
function reset() {
state.value = 0
setTimeout(() => {
state.value = Math.random() > 0.9 ? 2 : 1
if (state.value === 2) {
setTimeout(reset, 1000)
}
}, Math.round(Math.random() * 3000) + 400)
}
const color = computed(() => {
return {
'--vp-c-brand-1': state.value === 1
? 'var(--color-brand)'
: state.value === 2
? 'var(--vp-c-red-1)'
: 'var(--vp-c-yellow-1)',
} as any
})
const scope = effectScope()
const visibility = scope.run(() => useElementVisibility(el))
onMounted(async () => {
await until(visibility).toBe(true)
scope.stop()
reset()
})
</script>
<template>
<li :style="color">
<div ref="el" class="icon-container">
<div class="icon-wrapper" :class="state ? 'flip' : ''">
<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 32 32" class="icon-spinner">
<circle cx="16" cy="16" r="13" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="8 4" />
</svg>
</div>
<div class="icon-wrapper" :class="state === 2 ? '' : 'flip'">
<Icon icon="carbon:close-outline" class="icon-error" width="1.2em" height="1.2em" />
</div>
<div class="icon-wrapper" :class="state === 1 ? '' : 'flip'">
<Icon icon="carbon:checkmark-outline" class="icon-success" width="1.2em" height="1.2em" />
</div>
</div>
<div>
<slot />
</div>
</li>
</template>
<style scoped>
.icon-container {
position: relative;
width: 1.2em;
height: 1.2em;
flex: none;
margin-top: auto;
margin-bottom: auto;
vertical-align: middle;
}
.icon-wrapper {
position: absolute;
transition: all 300ms;
}
.flip {
transform: rotateY(90deg);
}
.icon-spinner {
animation: spin 1s linear infinite;
color: var(--vp-c-yellow-1);
}
.icon-error {
color: var(--vp-c-red-1);
}
.icon-success {
color: var(--color-brand);
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
================================================
FILE: docs/.vitepress/components/Version.vue
================================================
<script setup lang="ts">
import { VPBadge } from '@voidzero-dev/vitepress-theme'
const { type = 'stable' } = defineProps<{
type?: 'stable' | 'experimental'
}>()
</script>
<template>
<VPBadge
:type="type === 'experimental' ? 'warning' : 'info'"
:title="type === 'experimental' ? 'This feature is experimental and does not follow SemVer.' : undefined"
>
<slot />+
</VPBadge>
</template>
================================================
FILE: docs/.vitepress/config.ts
================================================
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { transformerNotationWordHighlight } from '@shikijs/transformers'
import { withPwa } from '@vite-pwa/vitepress'
import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import {
groupIconMdPlugin,
groupIconVitePlugin,
} from 'vitepress-plugin-group-icons'
import llmstxt from 'vitepress-plugin-llms'
import { version } from '../../package.json'
import { teamMembers } from './contributors'
import {
bluesky,
contributing,
discord,
font,
github,
mastodon,
ogImage,
ogUrl,
releases,
vitestDescription,
vitestName,
} from './meta'
import { pwa } from './scripts/pwa'
import { transformHead } from './scripts/transformHead'
import { extendConfig } from '@voidzero-dev/vitepress-theme/config'
export default ({ mode }: { mode: string }) => {
return withPwa(extendConfig(defineConfig({
lang: 'en-US',
title: vitestName,
description: vitestDescription,
srcExclude: [
'**/guide/examples/*',
'**/guide/cli-generated.md',
],
locales: {
root: {
label: 'English',
lang: 'en-US',
},
zh: {
label: '简体中文',
lang: 'zh',
link: 'https://cn.vitest.dev/',
},
},
head: [
['meta', { name: 'theme-color', content: '#22FF84' }],
['link', { rel: 'icon', href: '/favicon.ico', sizes: '48x48' }],
['link', { rel: 'icon', href: '/logo-without-border.svg', type: 'image/svg+xml' }],
['meta', { name: 'author', content: `${teamMembers.map(c => c.name).join(', ')} and ${vitestName} contributors` }],
['meta', { name: 'keywords', content: 'vitest, vite, test, coverage, snapshot, react, vue, preact, svelte, solid, lit, marko, ruby, cypress, puppeteer, jsdom, happy-dom, test-runner, jest, typescript, esm, tinyspy, node' }],
['meta', { property: 'og:title', content: vitestName }],
['meta', { property: 'og:description', content: vitestDescription }],
['meta', { property: 'og:url', content: ogUrl }],
['meta', { property: 'og:image', content: ogImage }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['link', { rel: 'preload', as: 'style', onload: 'this.onload=null;this.rel=\'stylesheet\'', href: font }],
['noscript', {}, `<link rel="stylesheet" crossorigin="anonymous" href="${font}" />`],
['link', { rel: 'me', href: 'https://m.webtoo.ls/@vitest' }],
['link', { rel: 'mask-icon', href: '/logo.svg', color: '#ffffff' }],
['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png', sizes: '180x180' }],
[
'script',
{
'src': 'https://cdn.usefathom.com/script.js',
'data-site': 'BEAFAKYG',
'data-spa': 'auto',
'defer': '',
},
],
],
lastUpdated: true,
vite: {
plugins: [
groupIconVitePlugin({
customIcon: {
'CLI': 'vscode-icons:file-type-shell',
'.spec.ts': 'vscode-icons:file-type-testts',
'.test.ts': 'vscode-icons:file-type-testts',
'.spec.js': 'vscode-icons:file-type-testjs',
'.test.js': 'vscode-icons:file-type-testjs',
'next': '',
},
}),
llmstxt(),
],
},
markdown: {
config(md) {
md.use(tabsMarkdownPlugin)
md.use(groupIconMdPlugin)
},
theme: {
light: 'github-light',
dark: 'github-dark',
},
codeTransformers: mode === 'development'
? [transformerNotationWordHighlight()]
: [
transformerNotationWordHighlight(),
transformerTwoslash({
processHoverInfo: (info) => {
if (info.includes(process.cwd())) {
return info.replace(new RegExp(process.cwd(), 'g'), '')
}
return info
},
}),
],
languages: ['js', 'jsx', 'ts', 'tsx'],
},
themeConfig: {
variant: 'vitest',
logo: '/logo.svg',
editLink: {
pattern: 'https://github.com/vitest-dev/vitest/edit/main/docs/:path',
text: 'Suggest changes to this page',
},
search: {
provider: 'local',
/* provider: 'algolia',
options: {
appId: 'ZTF29HGJ69',
apiKey: '9c3ced6fed60d2670bb36ab7e8bed8bc',
indexName: 'vitest',
// searchParameters: {
// facetFilters: ['tags:en'],
// },
}, */
},
banner: {
id: 'viteplus-alpha',
text: 'Announcing Vite+ Alpha: Open source. Unified. Next-gen.',
url: 'https://voidzero.dev/posts/announcing-vite-plus-alpha?utm_source=vitest&utm_content=top_banner',
},
carbonAds: {
code: 'CW7DVKJE',
placement: 'vitestdev',
},
socialLinks: [
{ icon: 'bluesky', link: bluesky },
{ icon: 'mastodon', link: mastodon },
{ icon: 'discord', link: discord },
{ icon: 'github', link: github },
],
footer: {
copyright: `© ${new Date().getFullYear()} VoidZero Inc. and Vitest contributors.`,
nav: [
{
title: 'Vitest',
items: [
{ text: 'Guides', link: '/guide/' },
{ text: 'API', link: '/api/test' },
{ text: 'Config', link: '/config/' },
],
},
{
title: 'Resources',
items: [
{ text: 'Team', link: '/team' },
{ text: 'Blog', link: '/blog' },
{ text: 'Releases', link: releases },
],
},
{
title: 'Versions',
items: [
{ text: 'Unreleased Docs', link: 'https://main.vitest.dev/' },
{ text: 'Vitest v3 Docs', link: 'https://v3.vitest.dev/' },
{ text: 'Vitest v2 Docs', link: 'https://v2.vitest.dev/' },
{ text: 'Vitest v1 Docs', link: 'https://v1.vitest.dev/' },
{ text: 'Vitest v0 Docs', link: 'https://v0.vitest.dev/' },
],
},
/* {
title: 'Legal',
items: [
{ text: 'Terms & Conditions', link: 'https://voidzero.dev/terms' },
{ text: 'Privacy Policy', link: 'https://voidzero.dev/privacy' },
{ text: 'Cookie Policy', link: 'https://voidzero.dev/cookies' },
],
}, */
],
social: [
{ icon: 'github', link: github },
{ icon: 'discord', link: discord },
// { icon: 'mastodon', link: mastodon }, -- the link shows github
{ icon: 'bluesky', link: bluesky },
],
},
nav: [
{ text: 'Guides', link: '/guide/', activeMatch: '^/guide/' },
{ text: 'API', link: '/api/test', activeMatch: '^/api/' },
{ text: 'Config', link: '/config/', activeMatch: '^/config/' },
{
text: 'Blog',
link: '/blog',
},
{
text: `v${version}`,
items: [
{
items: [
{
text: `v${version}`,
link: `https://github.com/vitest-dev/vitest/releases/tag/v${version}`,
},
{
text: 'Releases Notes',
link: releases,
},
{
text: 'Contributing',
link: contributing,
},
{
text: 'Team',
link: '/team',
},
],
},
{
items: [
{
text: 'unreleased',
link: 'https://main.vitest.dev/',
},
{
text: 'v3.x',
link: 'https://v3.vitest.dev/',
},
{
text: 'v2.x',
link: 'https://v2.vitest.dev/',
},
{
text: 'v1.x',
link: 'https://v1.vitest.dev/',
},
{
text: 'v0.x',
link: 'https://v0.vitest.dev/',
},
],
},
],
},
],
sidebar: {
'/config': [
{
text: 'Config Reference',
collapsed: false,
items: [
{
text: 'Config File',
link: '/config/',
},
{
text: 'include',
link: '/config/include',
},
{
text: 'exclude',
link: '/config/exclude',
},
{
text: 'includeSource',
link: '/config/include-source',
},
{
text: 'name',
link: '/config/name',
},
{
text: 'server',
link: '/config/server',
},
{
text: 'deps',
link: '/config/deps',
},
{
text: 'runner',
link: '/config/runner',
},
{
text: 'benchmark',
link: '/config/benchmark',
},
{
text: 'alias',
link: '/config/alias',
},
{
text: 'globals',
link: '/config/globals',
},
{
text: 'environment',
link: '/config/environment',
},
{
text: 'environmentOptions',
link: '/config/environmentoptions',
},
{
text: 'watch',
link: '/config/watch',
},
{
text: 'watchTriggerPatterns',
link: '/config/watchtriggerpatterns',
},
{
text: 'root',
link: '/config/root',
},
{
text: 'dir',
link: '/config/dir',
},
{
text: 'reporters',
link: '/config/reporters',
},
{
text: 'outputFile',
link: '/config/outputfile',
},
{
text: 'pool',
link: '/config/pool',
},
{
text: 'execArgv',
link: '/config/execargv',
},
{
text: 'vmMemoryLimit',
link: '/config/vmmemorylimit',
},
{
text: 'fileParallelism',
link: '/config/fileparallelism',
},
{
text: 'maxWorkers',
link: '/config/maxworkers',
},
{
text: 'testTimeout',
link: '/config/testtimeout',
},
{
text: 'hookTimeout',
link: '/config/hooktimeout',
},
{
text: 'teardownTimeout',
link: '/config/teardowntimeout',
},
{
text: 'silent',
link: '/config/silent',
},
{
text: 'setupFiles',
link: '/config/setupfiles',
},
{
text: 'provide',
link: '/config/provide',
},
{
text: 'globalSetup',
link: '/config/globalsetup',
},
{
text: 'forceRerunTriggers',
link: '/config/forcereruntriggers',
},
{
text: 'coverage',
link: '/config/coverage',
},
{
text: 'testNamePattern',
link: '/config/testnamepattern',
},
{
text: 'ui',
link: '/config/ui',
},
{
text: 'open',
link: '/config/open',
},
{
text: 'api',
link: '/config/api',
},
{
text: 'clearMocks',
link: '/config/clearmocks',
},
{
text: 'mockReset',
link: '/config/mockreset',
},
{
text: 'restoreMocks',
link: '/config/restoremocks',
},
{
text: 'unstubEnvs',
link: '/config/unstubenvs',
},
{
text: 'unstubGlobals',
link: '/config/unstubglobals',
},
{
text: 'snapshotFormat',
link: '/config/snapshotformat',
},
{
text: 'snapshotSerializers',
link: '/config/snapshotserializers',
},
{
text: 'resolveSnapshotPath',
link: '/config/resolvesnapshotpath',
},
{
text: 'allowOnly',
link: '/config/allowonly',
},
{
text: 'passWithNoTests',
link: '/config/passwithnotests',
},
{
text: 'logHeapUsage',
link: '/config/logheapusage',
},
{
text: 'css',
link: '/config/css',
},
{
text: 'maxConcurrency',
link: '/config/maxconcurrency',
},
{
text: 'cache',
link: '/config/cache',
},
{
text: 'sequence',
link: '/config/sequence',
},
{
text: 'tags',
link: '/config/tags',
},
{
text: 'strictTags',
link: '/config/stricttags',
},
{
text: 'typecheck',
link: '/config/typecheck',
},
{
text: 'slowTestThreshold',
link: '/config/slowtestthreshold',
},
{
text: 'chaiConfig',
link: '/config/chaiconfig',
},
{
text: 'bail',
link: '/config/bail',
},
{
text: 'retry',
link: '/config/retry',
},
{
text: 'onConsoleLog',
link: '/config/onconsolelog',
},
{
text: 'onStackTrace',
link: '/config/onstacktrace',
},
{
text: 'onUnhandledError',
link: '/config/onunhandlederror',
},
{
text: 'dangerouslyIgnoreUnhandled...',
link: '/config/dangerouslyignoreunhandlederrors',
},
{
text: 'diff',
link: '/config/diff',
},
{
text: 'fakeTimers',
link: '/config/faketimers',
},
{
text: 'projects',
link: '/config/projects',
},
{
text: 'isolate',
link: '/config/isolate',
},
{
text: 'includeTaskLocation',
link: '/config/includetasklocation',
},
{
text: 'snapshotEnvironment',
link: '/config/snapshotenvironment',
},
{
text: 'env',
link: '/config/env',
},
{
text: 'expect',
link: '/config/expect',
},
{
text: 'printConsoleTrace',
link: '/config/printconsoletrace',
},
{
text: 'attachmentsDir',
link: '/config/attachmentsdir',
},
{
text: 'hideSkippedTests',
link: '/config/hideskippedtests',
},
{
text: 'mode',
link: '/config/mode',
},
{
text: 'expandSnapshotDiff',
link: '/config/expandsnapshotdiff',
},
{
text: 'disableConsoleIntercept',
link: '/config/disableconsoleintercept',
},
{
text: 'experimental',
link: '/config/experimental',
},
],
},
{
text: 'Browser Mode',
collapsed: false,
items: [
{
text: 'Providers',
collapsed: false,
items: [
{
text: 'playwright',
link: '/config/browser/playwright',
},
{
text: 'webdriverio',
link: '/config/browser/webdriverio',
},
{
text: 'preview',
link: '/config/browser/preview',
},
],
},
{
text: 'browser.enabled',
link: '/config/browser/enabled',
},
{
text: 'browser.instances',
link: '/config/browser/instances',
},
{
text: 'browser.headless',
link: '/config/browser/headless',
},
{
text: 'browser.isolate',
link: '/config/browser/isolate',
},
{
text: 'browser.testerHtmlPath',
link: '/config/browser/testerhtmlpath',
},
{
text: 'browser.api',
link: '/config/browser/api',
},
{
text: 'browser.provider',
link: '/config/browser/provider',
},
{
text: 'browser.ui',
link: '/config/browser/ui',
},
{
text: 'browser.detailsPanelPosition',
link: '/config/browser/detailspanelposition',
},
{
text: 'browser.viewport',
link: '/config/browser/viewport',
},
{
text: 'browser.locators',
link: '/config/browser/locators',
},
{
text: 'browser.screenshotDirectory',
link: '/config/browser/screenshotdirectory',
},
{
text: 'browser.screenshotFailures',
link: '/config/browser/screenshotfailures',
},
{
text: 'browser.orchestratorScripts',
link: '/config/browser/orchestratorscripts',
},
{
text: 'browser.commands',
link: '/config/browser/commands',
},
{
text: 'browser.connectTimeout',
link: '/config/browser/connecttimeout',
},
{
text: 'browser.trace',
link: '/config/browser/trace',
},
{
text: 'browser.trackUnhandledErrors',
link: '/config/browser/trackunhandlederrors',
},
{
text: 'browser.expect',
link: '/config/browser/expect',
},
],
},
// {
// text: '@vitest/plugin-eslint',
// collapsed: true,
// items: [
// {
// text: 'Lints',
// link: '/config/eslint',
// },
// // TODO: generate
// {
// text: 'consistent-test-filename',
// link: '/config/eslint/consistent-test-filename',
// },
// {
// text: 'consistent-test-it',
// link: '/config/eslint/consistent-test-it',
// },
// ],
// },
// {
// text: 'vscode',
// link: '/config/vscode',
// },
],
'/guide': [
{
text: 'Introduction',
collapsed: false,
items: [
{
text: 'Why Vitest',
link: '/guide/why',
},
{
text: 'Getting Started',
link: '/guide/',
},
{
text: 'Features',
link: '/guide/features',
},
],
},
{
text: 'Browser Mode',
collapsed: false,
items: [
{
text: 'Why Browser Mode',
link: '/guide/browser/why',
docFooterText: 'Why Browser Mode | Browser Mode',
},
{
text: 'Getting Started',
link: '/guide/browser/',
docFooterText: 'Getting Started | Browser Mode',
},
{
text: 'Multiple Setups',
link: '/guide/browser/multiple-setups',
docFooterText: 'Multiple Setups | Browser Mode',
},
{
text: 'Component Testing',
link: '/guide/browser/component-testing',
docFooterText: 'Component Testing | Browser Mode',
},
{
text: 'Visual Regression Testing',
link: '/guide/browser/visual-regression-testing',
docFooterText: 'Visual Regression Testing | Browser Mode',
},
{
text: 'Trace View',
link: '/guide/browser/trace-view',
docFooterText: 'Trace View | Browser Mode',
},
],
},
{
text: 'Guides',
collapsed: false,
items: [
{
text: 'CLI',
link: '/guide/cli',
},
{
text: 'Test Filtering',
link: '/guide/filtering',
},
{
text: 'Test Tags',
link: '/guide/test-tags',
},
{
text: 'Test Context',
link: '/guide/test-context',
},
{
text: 'Test Environment',
link: '/guide/environment',
},
{
text: 'Test Run Lifecycle',
link: '/guide/lifecycle',
},
{
text: 'Snapshot',
link: '/guide/snapshot',
},
{
text: 'Mocking',
link: '/guide/mocking',
collapsed: true,
items: [
{
text: 'Mocking Dates',
link: '/guide/mocking/dates',
},
{
text: 'Mocking Functions',
link: '/guide/mocking/functions',
},
{
text: 'Mocking Globals',
link: '/guide/mocking/globals',
},
{
text: 'Mocking Modules',
link: '/guide/mocking/modules',
},
{
text: 'Mocking the File System',
link: '/guide/mocking/file-system',
},
{
text: 'Mocking Requests',
link: '/guide/mocking/requests',
},
{
text: 'Mocking Timers',
link: '/guide/mocking/timers',
},
{
text: 'Mocking Classes',
link: '/guide/mocking/classes',
},
],
},
{
text: 'Parallelism',
link: '/guide/parallelism',
},
{
text: 'Test Projects',
link: '/guide/projects',
},
{
text: 'Reporters',
link: '/guide/reporters',
},
{
text: 'Coverage',
link: '/guide/coverage',
},
{
text: 'Testing Types',
link: '/guide/testing-types',
},
{
text: 'Vitest UI',
link: '/guide/ui',
},
{
text: 'In-Source Testing',
link: '/guide/in-source',
},
{
text: 'Test Annotations',
link: '/guide/test-annotations',
},
{
text: 'Extending Matchers',
link: '/guide/extending-matchers',
},
{
text: 'IDE Integration',
link: '/guide/ide',
},
{
text: 'Debugging',
link: '/guide/debugging',
},
{
text: 'Common Errors',
link: '/guide/common-errors',
},
{
text: 'Migration Guide',
link: '/guide/migration',
collapsed: false,
items: [
{
text: 'Migrating to Vitest 4.0',
link: '/guide/migration#vitest-4',
},
{
text: 'Migrating from Jest',
link: '/guide/migration#jest',
},
{
text: 'Migrating from Mocha + Chai + Sinon',
link: '/guide/migration#mocha-chai-sinon',
},
],
},
{
text: 'Performance',
collapsed: false,
items: [
{
text: 'Profiling Test Performance',
link: '/guide/profiling-test-performance',
},
{
text: 'Improving Performance',
link: '/guide/improving-performance',
},
],
},
{
text: 'OpenTelemetry',
link: '/guide/open-telemetry',
},
],
},
{
text: 'Advanced',
collapsed: false,
items: [
{
text: 'Getting Started',
link: '/guide/advanced/',
},
{
text: 'Running Tests via API',
link: '/guide/advanced/tests',
},
{
text: 'Extending Reporters',
link: '/guide/advanced/reporters',
},
{
text: 'Custom Pool',
link: '/guide/advanced/pool',
},
],
},
{
items: [
{
text: 'Recipes',
link: '/guide/recipes',
},
{
text: 'Comparisons',
link: '/guide/comparisons',
},
],
},
],
'/api': [
{
text: 'Test API Reference',
items: [
{
text: 'Test',
link: '/api/test',
},
{
text: 'Describe',
link: '/api/describe',
},
{
text: 'Hooks',
link: '/api/hooks',
},
],
},
{
text: 'Mocks',
link: '/api/mock',
},
{
text: 'Vi Utility',
link: '/api/vi',
},
{
text: 'Expect',
link: '/api/expect',
},
{
text: 'ExpectTypeOf',
link: '/api/expect-typeof',
},
{
text: 'Assert',
link: '/api/assert',
},
{
text: 'AssertType',
link: '/api/assert-type',
},
{
text: 'Browser Mode',
items: [
{
text: 'Render Function',
collapsed: false,
items: [
{
text: 'react',
link: '/api/browser/react',
},
{
text: 'vue',
link: '/api/browser/vue',
},
{
text: 'svelte',
link: '/api/browser/svelte',
},
// {
// text: 'angular',
// link: '/api/browser/angular',
// },
],
},
{
text: 'Context',
link: '/api/browser/context',
},
{
text: 'Interactivity',
link: '/api/browser/interactivity',
},
{
text: 'Locators',
link: '/api/browser/locators',
},
{
text: 'Assertions',
link: '/api/browser/assertions',
},
{
text: 'Commands',
link: '/api/browser/commands',
},
],
},
{
text: 'Advanced',
collapsed: false,
items: [
{
text: 'Vitest',
link: '/api/advanced/vitest',
},
{
text: 'TestProject',
link: '/api/advanced/test-project',
},
{
text: 'TestSpecification',
link: '/api/advanced/test-specification',
},
{
text: 'TestCase',
link: '/api/advanced/test-case',
},
{
text: 'TestSuite',
link: '/api/advanced/test-suite',
},
{
text: 'TestModule',
link: '/api/advanced/test-module',
},
{
text: 'TestCollection',
link: '/api/advanced/test-collection',
},
{
text: 'VitestPlugin',
link: '/api/advanced/plugin',
},
{
text: 'VitestRunner',
link: '/api/advanced/runner',
},
{
text: 'Reporter',
link: '/api/advanced/reporters',
},
{
text: 'TaskMeta',
link: '/api/advanced/metadata',
},
{
text: 'TestArtifact',
link: '/api/advanced/artifacts',
},
],
},
// {
// text: 'Text Runner',
// collapsed: false,
// items: [
// // TODO: generate
// {
// text: 'test',
// link: '/api/test',
// },
// {
// text: 'describe',
// link: '/api/describe',
// },
// {
// text: 'beforeEach',
// link: '/api/before-each',
// },
// {
// text: 'afterEach',
// link: '/api/after-each',
// },
// ],
// },
// {
// text: 'Assertion API',
// collapsed: false,
// items: [
// {
// text: 'expect',
// link: '/api/expect',
// },
// {
// text: 'assert',
// link: '/api/assert',
// },
// {
// text: 'expectTypeOf',
// link: '/api/expect-typeof',
// },
// {
// text: 'assertType',
// link: '/api/assert-type',
// },
// ],
// },
// {
// text: 'Vi Utility API',
// collapsed: false,
// items: [
// {
// text: 'Mock Modules',
// link: '/api/vi/mock-modiles',
// },
// {
// text: 'Mock Functions',
// link: '/api/vi/mock-functions',
// },
// {
// text: 'Mock Timers',
// link: '/api/vi/mock-timers',
// },
// {
// text: 'Miscellaneous',
// link: '/api/vi/miscellaneous',
// },
// ],
// },
// {
// text: 'Browser Mode',
// collapsed: false,
// items: [
// // TODO: generate
// {
// text: 'page',
// link: '/api/browser/page',
// },
// {
// text: 'locators',
// link: '/api/browser/locators',
// },
// ],
// },
],
},
},
pwa,
transformHead,
})))
}
================================================
FILE: docs/.vitepress/contributors.ts
================================================
import type { DefaultTheme } from 'vitepress'
export interface Contributor {
name: string
avatar: string
}
export interface CoreTeam extends DefaultTheme.TeamMember {
// required to download avatars from GitHub
github: string
bluesky?: string
mastodon?: string
discord?: string
youtube?: string
}
function getAvatarUrl(name: string) {
return import.meta.hot ? `https://github.com/${name}.png` : `/user-avatars/${name}.png`
}
function createLinks(tm: CoreTeam): CoreTeam {
tm.links = [{ icon: 'github', link: `https://github.com/${tm.github}` }]
if (tm.bluesky) {
tm.links.push({ icon: 'bluesky', link: tm.bluesky })
}
if (tm.mastodon) {
tm.links.push({ icon: 'mastodon', link: tm.mastodon })
}
if (tm.discord) {
tm.links.push({ icon: 'discord', link: tm.discord })
}
if (tm.youtube) {
tm.links.push({ icon: 'youtube', link: `https://www.youtube.com/@${tm.youtube}` })
}
return tm
}
const plainTeamMembers: CoreTeam[] = [
{
avatar: getAvatarUrl('sheremet-va'),
name: 'Vladimir',
github: 'sheremet-va',
bluesky: 'https://bsky.app/profile/erus.dev',
mastodon: 'https://elk.zone/m.webtoo.ls/@sheremet_va',
sponsor: 'https://github.com/sponsors/sheremet-va',
title: 'Open source developer',
desc: 'Core team member of Vitest & Vite',
org: 'VoidZero',
orgLink: 'https://voidzero.dev/',
},
{
avatar: getAvatarUrl('antfu'),
name: 'Anthony Fu',
github: 'antfu',
bluesky: 'https://bsky.app/profile/antfu.me',
mastodon: 'https://elk.zone/m.webtoo.ls/@antfu',
discord: 'https://chat.antfu.me',
youtube: 'antfu',
sponsor: 'https://github.com/sponsors/antfu',
title: 'A fanatical open sourceror',
org: 'Vercel',
orgLink: 'https://vercel.com/',
desc: 'Core team member of Vite & Vue',
},
{
avatar: getAvatarUrl('AriPerkkio'),
name: 'Ari Perkkiö',
github: 'AriPerkkio',
bluesky: 'https://bsky.app/profile/ariperkkio.dev',
sponsor: 'https://github.com/sponsors/AriPerkkio',
title: 'Open source engineer',
desc: 'Core team member of Vitest',
org: 'Chromatic',
orgLink: 'https://www.chromatic.com/',
},
{
avatar: getAvatarUrl('hi-ogawa'),
name: 'Hiroshi Ogawa',
github: 'hi-ogawa',
bluesky: 'https://bsky.app/profile/hiogawa.bsky.social',
sponsor: 'https://github.com/sponsors/hi-ogawa',
title: 'Open source enthusiast',
desc: 'Team member of Vitest',
org: 'VoidZero',
orgLink: 'https://voidzero.dev/',
},
{
avatar: getAvatarUrl('patak-dev'),
name: 'Patak',
github: 'patak-dev',
bluesky: 'https://bsky.app/profile/patak.dev',
mastodon: 'https://elk.zone/m.webtoo.ls/@patak',
sponsor: 'https://github.com/sponsors/patak-dev',
title: 'Independent Open Source Adventurer',
desc: 'Core team member of Vite & Vue',
},
{
avatar: getAvatarUrl('userquin'),
name: 'Joaquín Sánchez',
github: 'userquin',
bluesky: 'https://bsky.app/profile/userquin.bsky.social',
mastodon: 'https://elk.zone/m.webtoo.ls/@userquin',
title: 'A fullstack and android developer',
desc: 'Vite\'s fanatical follower',
},
]
const plainTeamEmeritiMembers: CoreTeam[] = [
{
avatar: getAvatarUrl('Dunqing'),
name: 'Dunqing',
github: 'Dunqing',
title: 'A passionate enthusiast of open source contributions',
desc: 'Team member of oxc & UnoCSS',
},
{
avatar: getAvatarUrl('Aslemammad'),
name: 'Mohammad Bagher',
github: 'Aslemammad',
bluesky: 'https://bsky.app/profile/aslemammad.bsky.social',
mastodon: 'https://elk.zone/m.webtoo.ls/@aslemammad',
title: 'An open source developer',
desc: 'Team member of Poimandres & Vike',
},
{
avatar: getAvatarUrl('Demivan'),
name: 'Ivan Demchuk',
github: 'Demivan',
mastodon: 'https://elk.zone/fosstodon.org/@demivan',
title: 'A tech lead, fullstack developer',
desc: 'Author of fluent-vue',
},
{
avatar: getAvatarUrl('poyoho'),
name: 'Yoho Po',
github: 'poyoho',
title: 'It\'s no problem in my locall',
desc: 'Core team member of Vite & Team member of Vitest',
},
{
avatar: getAvatarUrl('zxch3n'),
name: 'Zixuan Chen',
github: 'zxch3n',
bluesky: 'https://bsky.app/profile/zxch3n.bsky.social',
mastodon: 'https://elk.zone/hachyderm.io/@zx',
title: 'A fullstack developer',
desc: 'Working on CRDTs & local-first software',
},
]
const teamMembers = plainTeamMembers.map(tm => createLinks(tm))
const teamEmeritiMembers = plainTeamEmeritiMembers.map(tm => createLinks(tm))
export { teamEmeritiMembers, teamMembers }
================================================
FILE: docs/.vitepress/meta.ts
================================================
// noinspection ES6PreferShortImport: IntelliJ IDE hint to avoid warning to use `~/contributors`, will fail on build if changed
/* Texts */
export const vitestName = 'Vitest'
export const vitestShortName = 'Vitest'
export const vitestDescription = 'Next generation testing framework powered by Vite'
/* CDN fonts and styles */
export const googleapis = 'https://fonts.googleapis.com'
export const gstatic = 'https://fonts.gstatic.com'
export const font = `${googleapis}/css2?family=Readex+Pro:wght@200;400;600&display=swap`
/* vitepress head */
export const ogUrl = 'https://vitest.dev/'
export const ogImage = `${ogUrl}og.jpg`
/* GitHub and social links */
export const github = 'https://github.com/vitest-dev/vitest'
export const releases = 'https://github.com/vitest-dev/vitest/releases'
export const contributing = 'https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md'
export const discord = 'https://chat.vitest.dev'
export const bluesky = 'https://bsky.app/profile/vitest.dev'
export const mastodon = 'https://elk.zone/m.webtoo.ls/@vitest'
/* Avatar/Image/Sponsors servers */
export const preconnectLinks = [googleapis, gstatic]
export const preconnectHomeLinks = [googleapis, gstatic]
/* PWA runtime caching urlPattern regular expressions */
export const pwaFontsRegex = new RegExp(`^${googleapis}/.*`, 'i')
export const pwaFontStylesRegex = new RegExp(`^${gstatic}/.*`, 'i')
// eslint-disable-next-line prefer-regex-literals
export const githubusercontentRegex = new RegExp('^https://((i.ibb.co)|((raw|user-images).githubusercontent.com))/.*', 'i')
================================================
FILE: docs/.vitepress/scripts/cli-generator.ts
================================================
import type { CLIOption, CLIOptions } from '../../../packages/vitest/src/node/cli/cli-config'
import { writeFileSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { cliOptionsConfig } from '../../../packages/vitest/src/node/cli/cli-config'
const docsDir = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
const cliTablePath = resolve(docsDir, './guide/cli-generated.md')
const nonNullable = <T>(value: T): value is NonNullable<T> => value !== null && value !== undefined
const skipCli = new Set([
'mergeReports',
'changed',
'shard',
])
const skipConfig = new Set([
'config',
'api.port',
'api.host',
'api.strictPort',
'coverage.watermarks.statements',
'coverage.watermarks.lines',
'coverage.watermarks.branches',
'coverage.watermarks.functions',
'coverage.thresholds.statements',
'coverage.thresholds.branches',
'coverage.thresholds.functions',
'coverage.thresholds.lines',
'standalone',
'clearScreen',
'configLoader',
'color',
'run',
'hideSkippedTests',
'dom',
'inspect',
'inspectBrk',
'project',
'ui',
'browser.name',
'browser.fileParallelism',
'clearCache',
'tagsFilter',
'listTags',
])
function resolveOptions(options: CLIOptions<any>, parentName?: string) {
return Object.entries(options).flatMap(
([subcommandName, subcommandConfig]) => resolveCommand(
parentName ? `${parentName}.${subcommandName}` : subcommandName,
subcommandConfig,
),
).filter(nonNullable)
}
function resolveCommand(name: string, config: CLIOption<any> | null): any {
if (!config || skipCli.has(name)) {
return null
}
let title = '`'
if (config.shorthand) {
title += `-${config.shorthand}, `
}
title += `--${config.alias || name}`
if ('argument' in config) {
title += ` ${config.argument}`
}
title += '`'
if ('subcommands' in config && config.subcommands) {
return resolveOptions(config.subcommands, name)
}
return {
title: name,
cli: title,
description: config.description,
}
}
const options = resolveOptions(cliOptionsConfig)
const template = options.map((option) => {
const title = option.title
const cli = option.cli
const [page, ...hash] = (title.startsWith('browser.') ? title.slice(8) : title).toLowerCase().split('.')
const config = skipConfig.has(title) ? '' : `[${title}](${title.includes('browser.') ? '/config/browser/' : '/config/'}${page}${hash.length ? `#${[page, ...hash].join('-')}` : ''})`
return `### ${title}\n\n- **CLI:** ${cli}\n${config ? `- **Config:** ${config}\n` : ''}\n${option.description.replace(/https:\/\/vitest\.dev\//g, '/')}\n`
}).join('\n')
writeFileSync(cliTablePath, template, 'utf-8')
================================================
FILE: docs/.vitepress/scripts/fetch-avatars.ts
================================================
import { existsSync, promises as fsp } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, join, resolve } from 'pathe'
import { teamEmeritiMembers, teamMembers } from '../contributors'
const docsDir = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
const dirAvatars = resolve(docsDir, 'public/user-avatars/')
async function download(url: string, fileName: string) {
if (existsSync(fileName)) {
return
}
console.log('downloading', fileName)
try {
const image = await (await fetch(url)).arrayBuffer()
await fsp.writeFile(fileName, Buffer.from(image))
}
catch {}
}
async function fetchAvatars() {
if (!existsSync(dirAvatars)) {
await fsp.mkdir(dirAvatars, { recursive: true })
}
await Promise.all([...teamEmeritiMembers, ...teamMembers].map(c => c.github).map(name => download(`https://github.com/${name}.png?size=100`, join(dirAvatars, `${name}.png`))))
}
fetchAvatars()
================================================
FILE: docs/.vitepress/scripts/pwa.ts
================================================
import type { PwaOptions } from '@vite-pwa/vitepress'
import {
githubusercontentRegex,
pwaFontsRegex,
pwaFontStylesRegex,
vitestDescription,
vitestName,
vitestShortName,
} from '../meta'
export const pwa: PwaOptions = {
outDir: '.vitepress/dist',
registerType: 'autoUpdate',
// include all static assets under public/
manifest: {
id: '/',
name: vitestName,
short_name: vitestShortName,
description: vitestDescription,
theme_color: '#ffffff',
start_url: '/',
lang: 'en-US',
dir: 'ltr',
orientation: 'natural',
display: 'standalone',
display_override: ['window-controls-overlay'],
categories: ['development', 'developer tools'],
icons: [
{
src: 'pwa-64x64.png',
sizes: '64x64',
type: 'image/png',
},
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
{
src: 'maskable-icon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
screenshots: [{
src: 'og.jpg',
sizes: '2258x1185',
type: 'image/jpeg',
label: `Screenshot of ${vitestName}`,
}],
handle_links: 'preferred',
launch_handler: {
client_mode: ['navigate-existing', 'auto'],
},
edge_side_panel: {
preferred_width: 480,
},
},
workbox: {
navigateFallbackDenylist: [/^\/new$/],
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // <== 3MB
globPatterns: ['**/*.{css,js,html,png,svg,ico,txt,woff2,json}'],
// Rollup 4 change the layout: don't calculate revision (hash)
dontCacheBustURLsMatching: /^assets\//,
runtimeCaching: [
{
urlPattern: pwaFontsRegex,
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: pwaFontStylesRegex,
handler: 'CacheFirst',
options: {
cacheName: 'gstatic-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: githubusercontentRegex,
handler: 'CacheFirst',
options: {
cacheName: 'githubusercontent-images-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
experimental: {
includeAllowlist: true,
},
}
================================================
FILE: docs/.vitepress/scripts/transformHead.ts
================================================
import type { HeadConfig, TransformContext } from 'vitepress'
import { preconnectHomeLinks, preconnectLinks } from '../meta'
export async function transformHead({ pageData }: TransformContext): Promise<HeadConfig[]> {
const head: HeadConfig[] = []
const home = pageData.relativePath === 'index.md'
;(home ? preconnectHomeLinks : preconnectLinks).forEach((link) => {
head.push(['link', { rel: 'dns-prefetch', href: link }])
head.push(['link', { rel: 'preconnect', href: link }])
})
head.push(['link', { rel: 'prefetch', href: '/logo.svg', as: 'image' }])
return head
}
================================================
FILE: docs/.vitepress/sponsors.ts
================================================
import type { SponsorTier } from '@voidzero-dev/vitepress-theme/src/types/sponsors'
export const sponsors: SponsorTier[] = [
{
tier: 'Special',
size: 'big',
items: [
{
name: 'Vercel',
url: 'https://vercel.com',
img: '/vercel.svg',
},
{
name: 'Chromatic',
url: 'https://www.chromatic.com/?utm_source=vitest&utm_medium=sponsorship&utm_campaign=vitestSponsorship',
img: '/chromatic.svg',
},
{
name: 'Zammad',
url: 'https://zammad.com',
img: '/zammad.svg',
},
],
},
{
tier: 'Platinum Sponsors',
size: 'big',
items: [
{
name: 'Bolt',
url: 'https://bolt.new',
img: '/bolt.svg',
},
],
},
{
tier: 'Gold',
size: 'medium',
items: [
{
name: 'vital',
url: 'https://vital.io/',
img: '/vital.svg',
},
{
name: 'OOMOL',
url: 'https://oomol.com/',
img: '/oomol.svg',
},
{
name: 'Mailmeteor',
url: 'https://mailmeteor.com/',
img: '/mailmeteor.svg',
},
{
name: 'Liminity',
url: 'https://www.liminity.se/',
img: '/liminity.svg',
},
{
name: 'Aerius Ventilation',
url: 'https://aerius.se/',
img: '/aerius.png',
},
],
},
]
================================================
FILE: docs/.vitepress/theme/FeatureGrid.vue
================================================
<script setup>
import esmAnimation from '@assets/vitest/animations/640_x_300_esm.riv'
import vitePoweredAnimation from '@assets/vitest/animations/650_x_300_vite_powered.riv'
import RiveAnimation from '@components/shared/RiveAnimation.vue'
</script>
<template>
<section class="wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel">
<div class="flex flex-col gap-3">
<div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
<h5 class="text-balance sm:text-pretty text-white">
Vite Powered
</h5>
<p class="sm:max-w-[30rem] text-pretty">
Reuse <code
class="mr-1 outline-none bg-nickel/50 text-vite"
>Vite</code>'s config and plugins - consistent across your app and tests.
But it's not required to use Vitest!
</p>
</div>
<RiveAnimation
:desktop-src="vitePoweredAnimation"
:desktop-width="650"
:desktop-height="300"
canvas-class="w-full"
/>
</div>
<div class="flex flex-col gap-3 border-r-0 justify-between">
<div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
<h5 class="text-white">
Jest Compatible
</h5>
<p class="max-w-[28rem] text-pretty">
Expect, snapshot, coverage, and more - migrating from <code
class="mr-1 outline-none bg-nickel/50 text-zest"
>Jest</code> is
straightforward.
</p>
</div>
<div class="flex-1 flex items-center justify-center p-5 sm:p-10">
<img src="@assets/vitest/vitest-jest-compatible.png" inert loading="lazy" alt="jest compatible" class="w-full max-w-50">
</div>
</div>
<div class="flex flex-col gap-3 justify-between">
<div class="p-5 sm:p-10 flex flex-col gap-3">
<h5 class="text-white">
Smart & instant watch mode
</h5>
<p class="max-w-[23rem] text-pretty">
Only rerun the related changes, just like HMR for tests!
</p>
</div>
<div class="card-bg px-5 sm:px-10 pt-5 sm:pt-10 flex justify-center">
<img src="@assets/vitest/vitest-watcher.png" inert loading="lazy" alt="typed api">
</div>
</div>
<div class="flex flex-col gap-3 justify-between">
<div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
<h5 class="text-white">
ESM, TypeScript, JSX
</h5>
<p class="max-w-[25rem] text-pretty">
Out-of-box ESM, TypeScript and JSX support powered by <code class="mx-1 outline-none bg-nickel/50 text-aqua">Oxc</code>.
</p>
</div>
<RiveAnimation
:desktop-src="esmAnimation"
:desktop-width="640"
:desktop-height="300"
canvas-class="w-full"
/>
</div>
</section>
<section class="wrapper border-t py-10 flex items-center justify-center">
<a href="/guide/features" class="button">See full features list</a>
</section>
</template>
<style scoped>
.card-bg {
background-image: url('@assets/vitest/vitest-watcher-background.jpg');
background-size: cover;
background-position: center;
}
</style>
================================================
FILE: docs/.vitepress/theme/Hero.vue
================================================
<template>
<div class="wrapper wrapper--ticks grid md:grid-cols-2 w-full border-nickel divide-x">
<div class="flex flex-col p-10 justify-center items-center md:items-start">
<div class="flex flex-col gap-5 max-w-[30rem] text-center md:text-left items-center md:items-start">
<a class="flex items-center gap-2" href="https://voidzero.dev" target="_blank">
<span class="text-grey text-xs font-mono uppercase tracking-wide">By</span>
<img src="@assets/logos/voidzero-light.svg" alt="VoidZero" class="h-2.5">
</a>
<h1 class="text-white text-pretty">
Next Generation Testing Framework
</h1>
<p class="text-white/70 text-lg max-w-[25rem] text-pretty">
A Vite-native testing framework. It's fast!
</p>
<div class="flex items-center gap-5 mt-8">
<a href="/guide/" class="button button--primary inline-block w-fit">
<span>Get Started</span>
</a>
<a href="https://github.com/vitest-dev/vitest" target="_blank" rel="noopener noreferrer" class="button inline-block w-fit">
View on GitHub
</a>
</div>
</div>
</div>
<div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
<div class="relative pl-6 sm:pl-16 h-full flex flex-col justify-center overflow-clip py-8 sm:py-16 hero-background">
<img src="@assets/vitest/hero-terminal.png" alt="Vitest terminal" class="w-full h-full object-contain">
</div>
</div>
</div>
</template>
<style scoped>
.hero-background {
background-image: url('@assets/vitest/hero-background.jpg');
background-size: cover;
background-position: center;
}
</style>
================================================
FILE: docs/.vitepress/theme/Home.vue
================================================
<script setup>
import Footer from '@components/oss/Footer.vue'
// import TrustedBy from '@components/oss/TrustedBy.vue'
import HeadingSection from '@components/oss/HeadingSection.vue'
import Sponsors from '@components/oss/Sponsors.vue'
import Spacer from '@components/shared/Spacer.vue'
import { sponsors } from '../sponsors'
import VitestFeatureGrid from './FeatureGrid.vue'
import Hero from './Hero.vue'
import Intro from './Intro.vue'
</script>
<template>
<Hero />
<!-- 'some-company' requires public/trusted-by/some-company.svg -->
<!-- <TrustedBy :logos="['some-company']" /> -->
<Intro />
<HeadingSection heading="Fast. Lightweight. Integrated." />
<VitestFeatureGrid />
<Sponsors
description="Vitest is free and open source, made possible by wonderful sponsors."
sponsor-link="https://github.com/sponsors/vitest-dev" :sponsors="sponsors"
/>
<Spacer />
<Footer
heading="Start testing with Vitest"
subheading="Supercharge your tests with unparalleled performance made for the modern web" button-text="Get started"
button-link="/guide/"
/>
</template>
================================================
FILE: docs/.vitepress/theme/Intro.vue
================================================
<template>
<div class="wrapper wrapper--ticks border-t py-14 lg:py-30 px-5 sm:px-10 lg:px-20">
<div class="flex flex-col lg:flex-row lg:justify-between lg:items-center gap-5 lg:gap-8 text-left">
<div class="flex flex-col gap-3 max-w-md">
<div class="flex gap-3 items-center">
<img src="@assets/icons/vitest-light.svg" alt="Vitest icon" class="size-5">
<span class="text-grey text-xs font-medium font-mono uppercase tracking-wide">Why Vitest</span>
</div>
<h3 class="text-white max-w-xl text-balance">
The Vite Native Test Runner
</h3>
<a href="/guide/why" target="_blank" class="button w-fit mt-8 hidden lg:block">Learn more</a>
</div>
<div class="lg:max-w-lg">
<p class="text-pretty mb-5">
Vitest was created to make testing just work for <a href="https://vite.dev" target="_blank"><code
class="mr-1 outline-none bg-nickel/50 text-vite"
>Vite</code></a> apps. By building on top of Vite, Vitest
natively
understands your Vite config and is able to reuse the same resolve and
transform pipelines.
</p>
<p class="text-pretty">
You can also use Vitest even if you are not using Vite. It is Jest-compatible
and works for backend code too.
</p>
<a href="/guide/why" target="_blank" class="button w-fit mt-8 block lg:hidden">Learn more</a>
</div>
</div>
</div>
</template>
================================================
FILE: docs/.vitepress/theme/index.ts
================================================
import type { Theme } from 'vitepress'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import { inBrowser } from 'vitepress'
import VitestTheme from '@voidzero-dev/vitepress-theme/src/vitest'
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
import Version from '../components/Version.vue'
import CRoot from '../components/CRoot.vue'
import Deprecated from '../components/Deprecated.vue'
import Experimental from '../components/Experimental.vue'
import Advanced from '../components/Advanced.vue'
import CourseLink from '../components/CourseLink.vue'
import './styles.css'
import '@shikijs/vitepress-twoslash/style.css'
import 'virtual:group-icons.css'
if (inBrowser) {
// redirect old hash links (e.g. /config/#reporters -> /config/reporters)
// before hydration to avoid SSG hydration mismatch
const redirect = getRedirectPath(new URL(location.href))
if (redirect) {
location.replace(redirect)
}
import('./pwa')
}
function getRedirectPath(url: URL) {
if (url.pathname === '/api/' || url.pathname === '/api' || url.pathname === '/api/index.html') {
return '/api/test'
}
if (!url.hash) {
return
}
// /config/#reporters -> /config/reporters
// /config/#coverage-provider -> /config/coverage#coverage-provider
// /config/#browser.enabled -> /config/browser/enabled
if (url.pathname === '/config' || url.pathname === '/config/' || url.pathname === '/config.html') {
if (url.hash.startsWith('#browser.')) {
const [page, ...hash] = url.hash.slice('#browser.'.length).toLowerCase().split('-')
return `/config/browser/${page}${hash.length ? `#${[page, ...hash].join('-')}` : ''}`
}
const [page, ...hash] = url.hash.slice(1).toLowerCase().split('-')
return `/config/${page}${hash.length ? `#${[page, ...hash].join('-')}` : ''}`
}
// /guide/browser/config#browser.locators-testidattribute -> /config/browser/locators#browser-locators-testidattribute
if (url.pathname === '/guide/browser/config' || url.pathname === '/guide/browser/config/' || url.pathname === '/guide/browser/config.html') {
const [page, ...hash] = url.hash.slice('#browser.'.length).toLowerCase().split('-')
return `/config/browser/${page}${hash.length ? `#${[page, ...hash].join('-')}` : ''}`
}
}
export default {
extends: VitestTheme as unknown as any,
enhanceApp({ app }) {
app.component('Version', Version)
app.component('CRoot', CRoot)
app.component('Experimental', Experimental)
app.component('Deprecated', Deprecated)
app.component('Advanced', Advanced)
app.component('CourseLink', CourseLink)
app.use(TwoslashFloatingVue)
enhanceAppWithTabs(app)
},
} satisfies Theme
================================================
FILE: docs/.vitepress/theme/pwa.ts
================================================
import { registerSW } from 'virtual:pwa-register'
registerSW({ immediate: true })
================================================
FILE: docs/.vitepress/theme/styles.css
================================================
@import "@voidzero-dev/vitepress-theme/src/styles/index.css";
@source "./**/*.vue";
/* Vitest */
:root[data-variant="vitest"] {
--color-brand: #008039;
/* TODO: home page wcag-aa color contrast (remove this once fixed at void0 theme):
* - why vitest section and texts
* - vitest, resources, versions and social
* - footer
*/
--color-grey: #867e8e;
}
:root.dark:not([data-theme])[data-variant="vitest"],
:root[data-theme="dark"][data-variant="vitest"] {
--color-brand: var(--color-zest);
}
:root[data-variant="vitest"]:not(.dark):not([data-theme="light"]),
:root[data-theme="light"][data-variant="vitest"] {
--color-brand: #008039;
/* TODO: code block (remove this once fixed at void0 theme) */
--vp-code-color: #007d38;
}
.highlighted-word {
background-color: var(--vp-code-line-highlight-color);
transition: background-color 0.5s;
display: inline-block;
}
/* credit goes to https://dylanatsmith.com/wrote/styling-the-kbd-element */
html:not(.dark) .VPContent kbd {
--kbd-color-background: #f7f7f7;
--kbd-color-border: #cbcccd;
--kbd-color-text: #222325;
}
.VPContent kbd {
--kbd-color-background: #898b90;
--kbd-color-border: #3d3e42;
--kbd-color-text: #222325;
background-color: var(--kbd-color-background);
color: var(--kbd-color-text);
border-radius: 0.25rem;
border: 1px solid var(--kbd-color-border);
box-shadow: 0 2px 0 1px var(--kbd-color-border);
font-family: var(--font-family-sans-serif);
font-size: 0.75em;
line-height: 1;
min-width: 0.75rem;
text-align: center;
padding: 2px 5px;
position: relative;
top: -1px;
}
================================================
FILE: docs/api/advanced/artifacts.md
================================================
---
outline: deep
title: Test Artifacts
---
# Test Artifacts <Advanced /> <Version type="experimental">4.0.11</Version> <Experimental />
::: warning
This is an advanced API. As a user, you most likely want to use [test annotations](/guide/test-annotations) to add notes or context to your tests instead. This is primarily used internally and by library authors.
:::
Test artifacts allow attaching or recording structured data, files, or metadata during test execution. This is a low-level feature primarily designed for:
- Internal use ([`annotate`](/guide/test-annotations) is built on top of the artifact system)
- Framework authors creating custom testing tools on top of Vitest
Each artifact includes:
- A type discriminator which is a unique identifier for the artifact type
- Custom data, can be any relevant information
- Optional attachments, either files or inline content associated with the artifact
- A source code location indicating where the artifact was created
Vitest automatically manages attachment serialization (files are copied to [`attachmentsDir`](/config/attachmentsdir)) and injects source location metadata, so you can focus on the data you want to record. All artifacts **must** extend from [`TestArtifactBase`](#testartifactbase) and all attachments from [`TestAttachment`](#testattachment) to be correctly handled internally.
## API
### `recordArtifact` <Experimental /> {#recordartifact}
::: warning
`recordArtifact` is an experimental API. Breaking changes might not follow SemVer, please pin Vitest's version when using it.
The API surface may change based on feedback. We encourage you to try it out and share your experience with the team.
:::
```ts
function recordArtifact<Artifact extends TestArtifact>(task: Test, artifact: Artifact): Promise<Artifact>
```
The `recordArtifact` function records an artifact during test execution and returns it. It expects a [task](/api/advanced/runner#tasks) as the first parameter and an object assignable to [`TestArtifact`](#testartifact) as the second.
::: info
Artifacts must be recorded before the task is reported. Any artifacts recorded after that will not be included in the task.
:::
When an artifact is recorded on a test, it emits an `onTestArtifactRecord` runner event and a [`onTestCaseArtifactRecord` reporter event](/api/advanced/reporters#ontestcaseartifactrecord). To retrieve recorded artifacts from a test case, use the [`artifacts()`](/api/advanced/test-case#artifacts) method.
Note: annotations, [even though they're built on top of this feature](#relationship-with-annotations), won't appear in the `task.artifacts` array for backwards compatibility reasons until the next major version.
### `TestArtifact`
The `TestArtifact` type is a union containing all artifacts Vitest can produce, including custom ones. All artifacts extend from [`TestArtifactBase`](#testartifactbase)
### `TestArtifactBase` <Experimental /> {#testartifactbase}
```ts
export interface TestArtifactBase {
/** File or data attachments associated with this artifact */
attachments?: TestAttachment[]
/** Source location where this artifact was created */
location?: TestArtifactLocation
}
```
The `TestArtifactBase` interface is the base for all test artifacts.
Extend this interface when creating custom test artifacts. Vitest automatically manages the `attachments` array and injects the `location` property to indicate where the artifact was created in your test code.
::: danger
When running with [`api.allowWrite`](/config/api#api-allowwrite) or [`browser.api.allowWrite`](/config/browser/api#api-allowwrite) disabled, Vitest empties the `attachments` array on every artifact before reporting it.
If your custom artifact narrows the `attachments` type (e.g. to a tuple), include `| []` in the union so the type reflects what actually happens at runtime.
:::
### `TestAttachment`
```ts
export interface TestAttachment {
/** MIME type of the attachment (e.g., 'image/png', 'text/plain') */
contentType?: string
/** File system path to the attachment */
path?: string
/** Inline attachment content as a string or raw binary data */
body?: string | Uint8Array
}
```
The `TestAttachment` interface represents a file or data attachment associated with a test artifact.
Attachments can be either file-based (via `path`) or inline content (via `body`). The `contentType` helps consumers understand how to interpret the attachment data.
### `TestArtifactLocation`
```ts
export interface TestArtifactLocation {
/** Line number in the source file (1-indexed) */
line: number
/** Column number in the line (1-indexed) */
column: number
/** Path to the source file */
file: string
}
```
The `TestArtifactLocation` interface represents the source code location information for a test artifact. It indicates where in the source code the artifact originated from.
### `TestArtifactRegistry`
The `TestArtifactRegistry` interface is a registry for custom test artifact types.
Augmenting this interface using [TypeScript's module augmentation feature](https://typescriptlang.org/docs/handbook/declaration-merging#module-augmentation) allows registering custom artifact types that tests can produce.
Each custom artifact should extend [`TestArtifactBase`](#testartifactbase) and include a unique `type` discriminator property.
Here are a few guidelines or best practices to follow:
- Try using a `Symbol` as the **registry key** to guarantee uniqueness
- The `type` property should follow the pattern `'package-name:artifact-name'`, **`'internal:'` is a reserved prefix**
- Use `attachments` to include files or data; extend [`TestAttachment`](#testattachment) for custom metadata
- If you narrow the `attachments` type (e.g. to a tuple), include `| []` in the union since Vitest may empty the array at runtime (see [`TestArtifactBase`](#testartifactbase))
- `location` property is automatically injected
## Custom Artifacts
To use and manage artifacts in a type-safe manner, you need to create its type and register it:
```ts
import type { TestArtifactBase, TestAttachment } from 'vitest'
interface A11yReportAttachment extends TestAttachment {
contentType: 'text/html'
path: string
}
interface AccessibilityArtifact extends TestArtifactBase {
type: 'a11y:report'
passed: boolean
wcagLevel: 'A' | 'AA' | 'AAA'
attachments: [A11yReportAttachment] | []
}
const a11yReportKey = Symbol('report')
declare module 'vitest' {
interface TestArtifactRegistry {
[a11yReportKey]: AccessibilityArtifact
}
}
```
As long as the types are assignable to their bases and don't have errors, everything should work fine and you should be able to record artifacts using [`recordArtifact`](#recordartifact):
```ts
async function toBeAccessible(
this: MatcherState,
actual: Element,
wcagLevel: 'A' | 'AA' | 'AAA' = 'AA'
): AsyncExpectationResult {
const report = await runAccessibilityAudit(actual, wcagLevel)
await recordArtifact(this.task, {
type: 'a11y:report',
passed: report.violations.length === 0,
wcagLevel,
attachments: [{
contentType: 'text/html',
path: report.path,
}],
})
return {
pass: violations.length === 0,
message: () => `Found ${report.violations.length} accessibility violation(s)`
}
}
```
## Relationship with Annotations
Test annotations are built on top of the artifact system. When using annotations in tests, they create `internal:annotation` artifacts under the hood. However, annotations are:
- Simpler to use
- Designed for end-users, not developers
Use annotations if you just want to add notes to your tests. Use artifacts if you need custom data.
================================================
FILE: docs/api/advanced/import-example.md
================================================
```ts
function import<T>(moduleId: string): Promise<T>
```
================================================
FILE: docs/api/advanced/metadata.md
================================================
# Task Metadata <Badge type="danger">advanced</Badge>
If you are developing a custom reporter or using Vitest Node.js API, you might find it useful to pass data from tests that are being executed in various contexts to your reporter or custom Vitest handler.
To accomplish this, relying on the [test context](/guide/test-context) is not feasible since it cannot be serialized. However, with Vitest, you can utilize the `meta` property available on every task (suite or test) to share data between your tests and the Node.js process. It's important to note that this communication is one-way only, as the `meta` property can only be modified from within the test context. Any changes made within the Node.js context will not be visible in your tests.
You can populate `meta` property on test context or inside `beforeAll`/`afterAll` hooks for suite tasks.
```ts
afterAll((suite) => {
suite.meta.done = true
})
test('custom', ({ task }) => {
task.meta.custom = 'some-custom-handler'
})
```
Once a test is completed, Vitest will send a task including the result and `meta` to the Node.js process using RPC, and then report it in `onTestCaseResult` and other hooks that have access to tasks. To process this test case, you can utilize the `onTestCaseResult` method available in your reporter implementation:
```ts [custom-reporter.js]
import type { Reporter, TestCase, TestModule } from 'vitest/node'
export default {
onTestCaseResult(testCase: TestCase) {
// custom === 'some-custom-handler' ✅
const { custom } = testCase.meta()
},
onTestRunEnd(testModule: TestModule) {
testModule.meta().done === true
testModule.children.at(0).meta().custom === 'some-custom-handler'
}
} satisfies Reporter
```
::: danger BEWARE
Vitest uses different methods to communicate with the Node.js process.
- If Vitest runs tests inside worker threads, it will send data via [message port](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort)
- If Vitest uses child process, the data will be send as a serialized Buffer via [`process.send`](https://nodejs.org/api/process.html#processsendmessage-sendhandle-options-callback) API
- If Vitest runs tests in the browser, the data will be stringified using [flatted](https://npmx.dev/package/flatted) package
This property is also present on every test in the `json` reporter, so make sure that data can be serialized into JSON.
Also, make sure you serialize [Error properties](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#error_types) before you set them.
:::
You can also get this information from Vitest state when tests finished running:
```ts
const vitest = await createVitest('test')
const { testModules } = await vitest.start()
const testModule = testModules[0]
testModule.meta().done === true
testModule.children.at(0).meta().custom === 'some-custom-handler'
```
It's also possible to extend type definitions when using TypeScript:
```ts
declare module 'vitest' {
interface TaskMeta {
done?: boolean
custom?: string
}
}
```
================================================
FILE: docs/api/advanced/plugin.md
================================================
---
title: Plugin API
outline: deep
---
# Plugin API <Version>3.1.0</Version> {#plugin-api}
::: warning
This is an advanced API. If you just want to [run tests](/guide/), you probably don't need this. It is primarily used by library authors.
This guide assumes you know how to work with [Vite plugins](https://vite.dev/guide/api-plugin.html).
:::
Vitest supports a `configureVitest` [plugin](https://vite.dev/guide/api-plugin.html) hook since version 3.1.
::: code-group
```ts [only vitest]
import type { Vite, VitestPluginContext } from 'vitest/node'
export function plugin(): Vite.Plugin {
return {
name: 'vitest:my-plugin',
configureVitest(context: VitestPluginContext) {
// ...
}
}
}
```
```ts [vite and vitest]
/// <reference types="vitest/config" />
import type { Plugin } from 'vite'
export function plugin(): Plugin {
return {
name: 'vitest:my-plugin',
transform() {
// ...
},
configureVitest(context) {
// ...
}
}
}
```
:::
::: tip TypeScript
Vitest re-exports all Vite type-only imports via a `Vite` namespace, which you can use to keep your versions in sync. However, if you are writing a plugin for both Vite and Vitest, you can continue using the `Plugin` type from the `vite` entrypoint. Just make sure you have `vitest/config` referenced somewhere so that `configureVitest` is augmented correctly:
```ts
/// <reference types="vitest/config" />
```
:::
Unlike [`reporter.onInit`](/api/advanced/reporters#oninit), this hooks runs early in Vitest lifecycle allowing you to make changes to configuration like `coverage` and `reporters`. A more notable change is that you can manipulate the global config from a [test project](/guide/projects) if your plugin is defined in the project and not in the global config.
## Context
### project
The current [test project](./test-project) that the plugin belongs to.
::: warning Browser Mode
Note that if you are relying on a browser feature, the `project.browser` field is not set yet. Use [`reporter.onBrowserInit`](./reporters#onbrowserinit) event instead.
:::
### vitest
The global [Vitest](./vitest) instance. You can change the global configuration by directly mutating the `vitest.config` property:
```ts
vitest.config.coverage.enabled = false
vitest.config.reporters.push([['my-reporter', {}]])
```
::: warning Config is Resolved
Note that Vitest already resolved the config, so some types might be different from the usual user configuration. This also means that some properties will not be resolved again, like `setupFile`. If you are adding new files, make sure to resolve it first.
At this point reporters are not created yet, so modifying `vitest.reporters` will have no effect because it will be overwritten. If you need to inject your own reporter, modify the config instead.
:::
### injectTestProjects
```ts
function injectTestProjects(
config: TestProjectConfiguration | TestProjectConfiguration[]
): Promise<TestProject[]>
```
This methods accepts a config glob pattern, a filepath to the config or an inline configuration. It returns an array of resolved [test projects](./test-project).
```ts
// inject a single project with a custom alias
const newProjects = await injectTestProjects({
// you can inherit the current project config by referencing `extends`
// note that you cannot have a project with the name that already exists,
// so it's a good practice to define a custom name
extends: project.vite.config.configFile,
test: {
name: 'my-custom-alias',
alias: {
customAlias: resolve('./custom-path.js'),
},
},
})
```
::: warning Projects are Filtered
Vitest filters projects during the config resolution, so if the user defined a filter, injected project might not be resolved unless it [matches the filter](./vitest#matchesprojectfilter). You can update the filter via the `vitest.config.project` option to always include your test project:
```ts
vitest.config.project.push('my-project-name')
```
Note that this will only affect projects injected with [`injectTestProjects`](#injecttestprojects) method.
:::
::: tip Referencing the Current Config
If you want to keep the user configuration, you can specify the `extends` property. All other properties will be merged with the user defined config.
The project's `configFile` can be accessed in Vite's config: `project.vite.config.configFile`.
Note that this will also inherit the `name` - Vitest doesn't allow multiple projects with the same name, so this will throw an error. Make sure you specified a different name. You can access the current name via the `project.name` property and all used names are available in the `vitest.projects` array.
:::
### experimental_defineCacheKeyGenerator <Version type="experimental">4.0.11</Version> <Experimental /> {#definecachekeygenerator}
```ts
interface CacheKeyIdGeneratorContext {
environment: DevEnvironment
id: string
sourceCode: string
}
function experimental_defineCacheKeyGenerator(
callback: (context: CacheKeyIdGeneratorContext) => string | undefined | null | false
): void
```
Define a generator that will be applied before hashing the cache key.
Use this to make sure Vitest generates correct hash. It is a good idea to define this function if your plugin can be registered with different options.
This is called only if [`experimental.fsModuleCache`](/config/experimental#experimental-fsmodulecache) is defined.
```ts
interface PluginOptions {
replacePropertyKey: string
replacePropertyValue: string
}
export function plugin(options: PluginOptions) {
return {
name: 'plugin-that-replaces-property',
transform(code) {
return code.replace(
options.replacePropertyKey,
options.replacePropertyValue
)
},
configureVitest({ experimental_defineCacheKeyGenerator }) {
experimental_defineCacheKeyGenerator(() => {
// since these options affect the transform result,
// return them together as a unique string
return options.replacePropertyKey + options.replacePropertyValue
})
}
}
}
```
If `false` is returned, the module will not be cached on the file system.
================================================
FILE: docs/api/advanced/reporters.md
================================================
# Reporters
::: warning
This is an advanced API. If you just want to configure built-in reporters, read the ["Reporters"](/guide/reporters) guide.
:::
Vitest has its own test run lifecycle. These are represented by reporter's methods:
- [`onInit`](#oninit)
- [`onTestRunStart`](#ontestrunstart)
- [`onTestModuleQueued`](#ontestmodulequeued)
- [`onTestModuleCollected`](#ontestmodulecollected)
- [`onTestModuleStart`](#ontestmodulestart)
- [`onTestSuiteReady`](#ontestsuiteready)
- [`onHookStart(beforeAll)`](#onhookstart)
- [`onHookEnd(beforeAll)`](#onhookend)
- [`onTestCaseReady`](#ontestcaseready)
- [`onTestCaseAnnotate`](#ontestcaseannotate) <Version>3.2.0</Version>
- [`onTestCaseArtifactRecord`](#ontestcaseartifactrecord) <Version type="experimental">4.0.11</Version>
- [`onHookStart(beforeEach)`](#onhookstart)
- [`onHookEnd(beforeEach)`](#onhookend)
- [`onHookStart(afterEach)`](#onhookstart)
- [`onHookEnd(afterEach)`](#onhookend)
- [`onTestCaseResult`](#ontestcaseresult)
- [`onHookStart(afterAll)`](#onhookstart)
- [`onHookEnd(afterAll)`](#onhookend)
- [`onTestSuiteResult`](#ontestsuiteresult)
- [`onTestModuleEnd`](#ontestmoduleend)
- [`onCoverage`](#oncoverage)
- [`onTestRunEnd`](#ontestrunend)
Tests and suites within a single module will be reported in order unless they were skipped. All skipped tests are reported at the end of suite/module.
Note that since test modules can run in parallel, Vitest will report them in parallel.
This guide lists all supported reporter methods. However, don't forget that instead of creating your own reporter, you can [extend existing one](/guide/advanced/reporters) instead:
```ts [custom-reporter.js]
import { BaseReporter } from 'vitest/node'
export default class CustomReporter extends BaseReporter {
onTestRunEnd(testModules, errors) {
console.log(testModule.length, 'tests finished running')
super.onTestRunEnd(testModules, errors)
}
}
```
## onInit
```ts
function onInit(vitest: Vitest): Awaitable<void>
```
This method is called when [Vitest](/api/advanced/vitest) was initiated or started, but before the tests were filtered.
::: info
Internally this method is called inside [`vitest.start`](/api/advanced/vitest#start), [`vitest.init`](/api/advanced/vitest#init) or [`vitest.mergeReports`](/api/advanced/vitest#mergereports). If you are using programmatic API, make sure to call either one depending on your needs before calling [`vitest.runTestSpecifications`](/api/advanced/vitest#runtestspecifications), for example. Built-in CLI will always run methods in correct order.
:::
Note that you can also get access to `vitest` instance from test cases, suites and test modules via a [`project`](/api/advanced/test-project) property, but it might also be useful to store a reference to `vitest` in this method.
::: details Example
```ts
import type { Reporter, TestSpecification, Vitest } from 'vitest/node'
class MyReporter implements Reporter {
private vitest!: Vitest
onInit(vitest: Vitest) {
this.vitest = vitest
}
onTestRunStart(specifications: TestSpecification[]) {
console.log(
specifications.length,
'test files will run in',
this.vitest.config.root,
)
}
}
export default new MyReporter()
```
:::
## onBrowserInit {#onbrowserinit}
```ts
function onBrowserInit(project: TestProject): Awaitable<void>
```
This method is called when the browser instance is initiated. It receives an instance of the project for which the browser is initiated. `project.browser` will always be defined when this method is called.
## onTestRunStart
```ts
function onTestRunStart(
specifications: TestSpecification[]
): Awaitable<void>
```
This method is called when a new test run has started. It receives an array of [test specifications](/api/advanced/test-specification) scheduled to run. This array is readonly and available only for information purposes.
If Vitest didn't find any test files to run, this event will be invoked with an empty array, and then [`onTestRunEnd`](#ontestrunend) will be called immediately after.
::: details Example
```ts
import type { Reporter, TestSpecification } from 'vitest/node'
class MyReporter implements Reporter {
onTestRunStart(specifications: TestSpecification[]) {
console.log(specifications.length, 'test files will run')
}
}
export default new MyReporter()
```
:::
## onTestRunEnd
```ts
function onTestRunEnd(
testModules: ReadonlyArray<TestModule>,
unhandledErrors: ReadonlyArray<SerializedError>,
reason: TestRunEndReason
): Awaitable<void>
```
This method is called after all tests have finished running and the coverage merged all reports, if it's enabled. Note that you can get the coverage information in [`onCoverage`](#oncoverage) hook.
It receives a readonly list of test modules. You can iterate over it via a [`testModule.children`](/api/advanced/test-collection) property to report the state and errors, if any.
The second argument is a readonly list of unhandled errors that Vitest wasn't able to attribute to any test. These can happen outside of the test run because of an error in a plugin, or inside the test run as a side-effect of a non-awaited function (for example, a timeout that threw an error after the test has finished running).
The third argument indicated why the test run was finished:
- `passed`: test run was finished normally and there are no errors
- `failed`: test run has at least one error (due to a syntax error during collection or an actual error during test execution)
- `interrupted`: test was interrupted by [`vitest.cancelCurrentRun`](/api/advanced/vitest#cancelcurrentrun) call or `Ctrl+C` was pressed in the terminal (note that it's still possible to have failed tests in this case)
If Vitest didn't find any test files to run, this event will be invoked with empty arrays of modules and errors, and the state will depend on the value of [`config.passWithNoTests`](/config/passwithnotests).
::: details Example
```ts
import type {
Reporter,
SerializedError,
TestModule,
TestRunEndReason,
TestSpecification
} from 'vitest/node'
class MyReporter implements Reporter {
onTestRunEnd(
testModules: ReadonlyArray<TestModule>,
unhandledErrors: ReadonlyArray<SerializedError>,
reason: TestRunEndReason,
) {
if (reason === 'passed') {
testModules.forEach(module => console.log(module.moduleId, 'succeeded'))
}
else if (reason === 'failed') {
// note that this will skip possible errors in suites
// you can get them from testSuite.errors()
for (const testCase of testModules.children.allTests()) {
if (testCase.result().state === 'failed') {
console.log(testCase.fullName, 'in', testCase.module.moduleId, 'failed')
console.log(testCase.result().errors)
}
}
}
else {
console.log('test run was interrupted, skipping report')
}
}
}
export default new MyReporter()
```
:::
## onCoverage
```ts
function onCoverage(coverage: unknown): Awaitable<void>
```
This hook is called after coverage results have been processed. Coverage provider's reporters are called after this hook. The typings of `coverage` depends on the `coverage.provider`. For Vitest's default built-in providers you can import the types from `istanbul-lib-coverage` package:
```ts
import type { CoverageMap } from 'istanbul-lib-coverage'
declare function onCoverage(coverage: CoverageMap): Awaitable<void>
```
If Vitest didn't perform any coverage, this hook is not called.
## onTestModuleQueued
```ts
function onTestModuleQueued(testModule: TestModule): Awaitable<void>
```
This method is called right before Vitest imports the setup file and the test module itself. This means that `testModule` will have no [`children`](/api/advanced/test-suite#children) yet, but you can start reporting it as the next test to run.
## onTestModuleCollected
```ts
function onTestModuleCollected(testModule: TestModule): Awaitable<void>
```
This method is called when all tests inside the file were collected, meaning [`testModule.children`](/api/advanced/test-suite#children) collection is populated, but tests don't have any results yet.
## onTestModuleStart
```ts
function onTestModuleStart(testModule: TestModule): Awaitable<void>
```
This method is called right after [`onTestModuleCollected`](#ontestmodulecollected) unless Vitest runs in collection mode ([`vitest.collect()`](/api/advanced/vitest#collect) or `vitest collect` in the CLI), in this case it will not be called at all because there are no tests to run.
## onTestModuleEnd
```ts
function onTestModuleEnd(testModule: TestModule): Awaitable<void>
```
This method is called when every test in the module finished running. This means, every test inside [`testModule.children`](/api/advanced/test-suite#children) will have a `test.result()` that is not equal to `pending`.
## onHookStart
```ts
function onHookStart(context: ReportedHookContext): Awaitable<void>
```
This method is called when any of these hooks have started running:
- `beforeAll`
- `afterAll`
- `beforeEach`
- `afterEach`
If `beforeAll` or `afterAll` are started, the `entity` will be either [`TestSuite`](/api/advanced/test-suite) or [`TestModule`](/api/advanced/test-module).
If `beforeEach` or `afterEach` are started, the `entity` will always be [`TestCase`](/api/advanced/test-case).
::: warning
`onHookStart` method will not be called if the hook did not run during the test run.
:::
## onHookEnd
```ts
function onHookEnd(context: ReportedHookContext): Awaitable<void>
```
This method is called when any of these hooks have finished running:
- `beforeAll`
- `afterAll`
- `beforeEach`
- `afterEach`
If `beforeAll` or `afterAll` have finished, the `entity` will be either [`TestSuite`](/api/advanced/test-suite) or [`TestModule`](/api/advanced/test-module).
If `beforeEach` or `afterEach` have finished, the `entity` will always be [`TestCase`](/api/advanced/test-case).
::: warning
`onHookEnd` method will not be called if the hook did not run during the test run.
:::
## onTestSuiteReady
```ts
function onTestSuiteReady(testSuite: TestSuite): Awaitable<void>
```
This method is called before the suite starts to run its tests. This method is also called if the suite was skipped.
If the file doesn't have any suites, this method will not be called. Consider using `onTestModuleStart` to cover this use case.
## onTestSuiteResult
```ts
function onTestSuiteResult(testSuite: TestSuite): Awaitable<void>
```
This method is called after the suite has finished running tests. This method is also called if the suite was skipped.
If the file doesn't have any suites, this method will not be called. Consider using `onTestModuleEnd` to cover this use case.
## onTestCaseReady
```ts
function onTestCaseReady(testCase: TestCase): Awaitable<void>
```
This method is called before the test starts to run or it was skipped. Note that `beforeEach` and `afterEach` hooks are considered part of the test because they can influence the result.
::: warning
Notice that it's possible to have [`testCase.result()`](/api/advanced/test-case#result) with `passed` or `failed` state already when `onTestCaseReady` is called. This can happen if test was running too fast and both `onTestCaseReady` and `onTestCaseResult` were scheduled to run in the same microtask.
:::
## onTestCaseResult
```ts
function onTestCaseResult(testCase: TestCase): Awaitable<void>
```
This method is called when the test has finished running or was just skipped. Note that this will be called after the `afterEach` hook is finished, if there are any.
At this point, [`testCase.result()`](/api/advanced/test-case#result) will have non-pending state.
## onTestCaseAnnotate <Version>3.2.0</Version> {#ontestcaseannotate}
```ts
function onTestCaseAnnotate(
testCase: TestCase,
annotation: TestAnnotation,
): Awaitable<void>
```
The `onTestCaseAnnotate` hook is associated with the [`context.annotate`](/guide/test-context#annotate) method. When `annotate` is invoked, Vitest serialises it and sends the same attachment to the main thread where reporter can interact with it.
If the path is specified, Vitest stores it in a separate directory (configured by [`attachmentsDir`](/config/attachmentsdir)) and modifies the `path` property to reference it.
## onTestCaseArtifactRecord <Version type="experimental">4.0.11</Version> {#ontestcaseartifactrecord}
```ts
function onTestCaseArtifactRecord(
testCase: TestCase,
artifact: TestArtifact,
): Awaitable<void>
```
The `onTestCaseArtifactRecord` hook is associated with the [`recordArtifact`](/api/advanced/artifacts#recordartifact) utility. When `recordArtifact` is invoked, Vitest serialises it and sends the same attachment to the main thread where reporter can interact with it.
If the path is specified, Vitest stores it in a separate directory (configured by [`attachmentsDir`](/config/attachmentsdir)) and modifies the `path` property to reference it.
Note: annotations, [even though they're built on top of this feature](/api/advanced/artifacts#relationship-with-annotations), won't hit this hook and won't appear in the `task.artifacts` array for backwards compatibility reasons until the next major version.
================================================
FILE: docs/api/advanced/runner.md
================================================
# Runner API <Badge type="danger">advanced</Badge>
::: warning
This is advanced API. If you just want to [run tests](/guide/), you probably don't need this. It is primarily used by library authors.
:::
You can specify a path to your test runner with the `runner` option in your configuration file. This file should have a default export with a class constructor implementing these methods:
```ts
export interface VitestRunner {
/**
* First thing that's getting called before actually collecting and running tests.
*/
onBeforeCollect?: (paths: string[]) => unknown
/**
* Called after collecting tests and before "onBeforeRun".
*/
onCollected?: (files: File[]) => unknown
/**
* Called when test runner should cancel next test runs.
* Runner should listen for this method and mark tests and suites as skipped in
* "onBeforeRunSuite" and "onBeforeRunTask" when called.
*/
onCancel?: (reason: CancelReason) => unknown
/**
* Called before running a single test. Doesn't have "result" yet.
*/
onBeforeRunTask?: (test: Test) => unknown
/**
* Called before actually running the test function. Already has "result" with "state" and "startTime".
*/
onBeforeTryTask?: (test: Test, options: { retry: number; repeats: number }) => unknown
/**
* Called after result and state are set.
*/
onAfterRunTask?: (test: Test) => unknown
/**
* Called right after running the test function. Doesn't have new state yet. Will not be called, if the test function throws.
*/
onAfterTryTask?: (test: Test, options: { retry: number; repeats: number }) => unknown
/**
* Called after the retry resolution happened. Unlike `onAfterTryTask`, the test now has a new state.
* All `after` hooks were also called by this point.
*/
onAfterRetryTask?: (test: Test, options: { retry: number; repeats: number }) => unknown
/**
* Called before running a single suite. Doesn't have "result" yet.
*/
onBeforeRunSuite?: (suite: Suite) => unknown
/**
* Called after running a single suite. Has state and result.
*/
onAfterRunSuite?: (suite: Suite) => unknown
/**
* If defined, will be called instead of usual Vitest suite partition and handling.
* "before" and "after" hooks will not be ignored.
*/
runSuite?: (suite: Suite) => Promise<void>
/**
* If defined, will be called instead of usual Vitest handling. Useful, if you have your custom test function.
* "before" and "after" hooks will not be ignored.
*/
runTask?: (test: TaskPopulated) => Promise<void>
/**
* Called, when a task is updated. The same as "onTaskUpdate" in a reporter, but this is running in the same thread as tests.
*/
onTaskUpdate?: (task: [string, TaskResult | undefined, TaskMeta | undefined][]) => Promise<void>
/**
* Called before running all tests in collected paths.
*/
onBeforeRunFiles?: (files: File[]) => unknown
/**
* Called right after running all tests in collected paths.
*/
onAfterRunFiles?: (files: File[]) => unknown
/**
* Called when new context for a test is defined. Useful, if you want to add custom properties to the context.
* If you only want to define custom context with a runner, consider using "beforeAll" in "setupFiles" instead.
*/
extendTaskContext?: (context: TestContext) => TestContext
/**
* Called when certain files are imported. Can be called in two situations: to collect tests and to import setup files.
*/
importFile: (filepath: string, source: VitestRunnerImportSource) => unknown
/**
* Function that is called when the runner attempts to get the value when `test.extend` is used with `{ injected: true }`
*/
injectValue?: (key: string) => unknown
/**
* Publicly available configuration.
*/
config: VitestRunnerConfig
/**
* The name of the current pool. Can affect how stack trace is inferred on the server side.
*/
pool?: string
}
```
When initiating this class, Vitest passes down Vitest config, - you should expose it as a `config` property:
```ts [runner.ts]
import type { RunnerTestFile, SerializedConfig, TestRunner, VitestTestRunner } from 'vitest'
class CustomRunner extends TestRunner implements VitestTestRunner {
public config: SerializedConfig
constructor(config: SerializedConfig) {
this.config = config
}
onAfterRunFiles(files: RunnerTestFile[]) {
console.log('finished running', files)
}
}
export default CustomRunner
```
::: warning
Vitest also injects an instance of `ModuleRunner` from `vite/module-runner` as `moduleRunner` property. You can use it to process files in `importFile` method (this is default behavior of `TestRunner` and `BenchmarkRunner`).
`ModuleRunner` exposes `import` method, which is used to import test files in a Vite-friendly environment. Meaning, it will resolve imports and transform file content at runtime so that Node can understand it:
```ts
export default class Runner {
async importFile(filepath: string) {
await this.moduleRunner.import(filepath)
}
}
```
:::
::: warning
If you don't have a custom runner or didn't define `runTest` method, Vitest will try to retrieve a task automatically. If you didn't add a function with `setFn`, it will fail.
:::
::: tip
Snapshot support and some other features depend on the runner. If you don't want to lose it, you can extend your runner from `VitestTestRunner` imported from `vitest/runners`. It also exposes `NodeBenchmarkRunner`, if you want to extend benchmark functionality.
:::
## Tasks
::: warning
The "Runner Tasks API" is experimental and should primarily be used only in the test runtime. Vitest also exposes the ["Reported Tasks API"](/api/advanced/test-module), which should be preferred when working in the main thread (inside the reporter, for example).
The team is currently discussing if "Runner Tasks" should be replaced by "Reported Tasks" in the future.
:::
Suites and tests are called `tasks` internally. Vitest runner initiates a `File` task before collecting any tests - this is a superset of `Suite` with a few additional properties. It is available on every task (including `File`) as a `file` property.
```ts
interface File extends Suite {
/**
* The name of the pool that the file belongs to.
* @default 'forks'
*/
pool?: string
/**
* The path to the file in UNIX format.
*/
filepath: string
/**
* The name of the test project the file belongs to.
*/
projectName: string | undefined
/**
* The time it took to collect all tests in the file.
* This time also includes importing all the file dependencies.
*/
collectDuration?: number
/**
* The time it took to import the setup file.
*/
setupDuration?: number
}
```
Every suite has a `tasks` property that is populated during collection phase. It is useful to traverse the task tree from the top down.
```ts
interface Suite extends TaskBase {
type: 'suite'
/**
* File task. It's the root task of the file.
*/
file: File
/**
* An array of tasks that are part of the suite.
*/
tasks: Task[]
}
```
Every task has a `suite` property that references a suite it is located in. If `test` or `describe` are initiated at the top level, they will not have a `suite` property (it will **not** be equal to `file`!). `File` also never has a `suite` property. It is useful to travers the tasks from the bottom up.
```ts
interface Test<ExtraContext = object> extends TaskBase {
type: 'test'
/**
* Test context that will be passed to the test function.
*/
context: TestContext & ExtraContext
/**
* File task. It's the root task of the file.
*/
file: File
/**
* Whether the task was skipped by calling `context.skip()`.
*/
pending?: boolean
/**
* Whether the task should succeed if it fails. If the task fails, it will be marked as passed.
*/
fails?: boolean
/**
* Store promises (from async expects) to wait for them before finishing the test
*/
promises?: Promise<any>[]
}
```
Every task can have a `result` field. Suites can only have this field if an error thrown within a suite callback or `beforeAll`/`afterAll` callbacks prevents them from collecting tests. Tests always have this field after their callbacks are called - the `state` and `errors` fields are present depending on the outcome. If an error was thrown in `beforeEach` or `afterEach` callbacks, the thrown error will be present in `task.result.errors`.
```ts
export interface TaskResult {
/**
* State of the task. Inherits the `task.mode` during collection.
* When the task has finished, it will be changed to `pass` or `fail`.
* - **pass**: task ran successfully
* - **fail**: task failed
*/
state: TaskState
/**
* Errors that occurred during the task execution. It is possible to have several errors
* if `expect.soft()` failed multiple times.
*/
errors?: TestError[]
/**
* How long in milliseconds the task took to run.
*/
duration?: number
/**
* Time in milliseconds when the task started running.
*/
startTime?: number
/**
* Heap size in bytes after the task finished.
* Only available if `logHeapUsage` option is set and `process.memoryUsage` is defined.
*/
heap?: number
/**
* State of related to this task hooks. Useful during reporting.
*/
hooks?: Partial<Record<'afterAll' | 'beforeAll' | 'beforeEach' | 'afterEach', TaskState>>
/**
* The amount of times the task was retried. The task is retried only if it
* failed and `retry` option is set.
*/
retryCount?: number
/**
* The amount of times the task was repeated. The task is repeated only if
* `repeats` option is set. This number also contains `retryCount`.
*/
repeatCount?: number
}
```
## Your Task Function
Vitest exposes `createTaskCollector` utility to create your own `test` method. It behaves the same way as a test, but calls a custom method during collection.
A task is an object that is part of a suite. It is automatically added to the current suite with a `suite.task` method:
```js [custom.js]
export { afterAll, beforeAll, describe, TestRunner } from 'vitest'
// this function will be called during collection phase:
// don't call function handler here, add it to suite tasks
// with "getCurrentSuite().task()" method
// note: createTaskCollector provides support for "todo"/"each"/...
export const myCustomTask = TestRunner.createTaskCollector(
function (name, fn, timeout) {
TestRunner.getCurrentSuite().task(name, {
...this, // so "todo"/"skip"/... is tracked correctly
meta: {
customPropertyToDifferentiateTask: true
},
handler: fn,
timeout,
})
}
)
```
```js [tasks.test.js]
import {
afterAll,
beforeAll,
describe,
myCustomTask
} from './custom.js'
import { gardener } from './gardener.js'
describe('take care of the garden', () => {
beforeAll(() => {
gardener.putWorkingClothes()
})
myCustomTask('weed the grass', () => {
gardener.weedTheGrass()
})
myCustomTask.todo('mow the lawn', () => {
gardener.mowerTheLawn()
})
myCustomTask('water flowers', () => {
gardener.waterFlowers()
})
afterAll(() => {
gardener.goHome()
})
})
```
```bash
vitest ./garden/tasks.test.js
```
================================================
FILE: docs/api/advanced/test-case.md
================================================
# TestCase
The `TestCase` class represents a single test. This class is only available in the main thread. Refer to the ["Runner API"](/api/advanced/runner#tasks) if you are working with runtime tasks.
The `TestCase` instance always has a `type` property with the value of `test`. You can use it to distinguish between different task types:
```ts
if (task.type === 'test') {
task // TestCase
}
```
## project
This references the [`TestProject`](/api/advanced/test-project) that the test belongs to.
## module
This is a direct reference to the [`TestModule`](/api/advanced/test-module) where the test is defined.
## name
This is a test name that was passed to the `test` function.
```ts
import { test } from 'vitest'
// [!code word:'the validation works correctly']
test('the validation works correctly', () => {
// ...
})
```
## fullName
The name of the test including all parent suites separated with `>` symbol. This test has a full name "the validation logic > the validation works correctly":
```ts
import { describe, test } from 'vitest'
// [!code word:'the validation works correctly']
// [!code word:'the validation logic']
describe('the validation logic', () => {
test('the validation works correctly', () => {
// ...
})
})
```
## id
This is test's unique identifier. This ID is deterministic and will be the same for the same test across multiple runs. The ID is based on the [project](/api/advanced/test-project) name, module ID and test order.
The ID looks like this:
```
1223128da3_0_0
^^^^^^^^^^ the file hash
^ suite index
^ test index
```
::: tip
You can generate file hash with `generateFileHash` function from `vitest/node` which is available since Vitest 3:
```ts
import { generateFileHash } from 'vitest/node'
const hash = generateFileHash(
'/file/path.js', // relative path
undefined, // the project name or `undefined` is not set
)
```
:::
::: danger
Don't try to parse the ID. It can have a minus at the start: `-1223128da3_0_0_0`.
:::
## location
The location in the module where the test was defined. Locations are collected only if [`includeTaskLocation`](/config/includetasklocation) is enabled in the config. Note that this option is automatically enabled if `--reporter=html`, `--ui` or `--browser` flags are used.
The location of this test will be equal to `{ line: 3, column: 1 }`:
```ts:line-numbers {3}
import { test } from 'vitest'
test('the validation works correctly', () => {
// ...
})
```
## parent
Parent [suite](/api/advanced/test-suite). If the test was called directly inside the [module](/api/advanced/test-module), the parent will be the module itself.
## options
```ts
interface TaskOptions {
readonly each: boolean | undefined
readonly fails: boolean | undefined
readonly concurrent: boolean | undefined
readonly shuffle: boolean | undefined
readonly retry: number | undefined
readonly repeats: number | undefined
readonly tags: string[] | undefined
readonly timeout: number | undefined
readonly mode: 'run' | 'only' | 'skip' | 'todo'
}
```
The options that test was collected with.
## tags <Version>4.1.0</Version> {#tags}
[Tags](/guide/test-tags) that were implicitly or explicitly assigned to the test.
## ok
```ts
function ok(): boolean
```
Checks if the test did not fail the suite. If the test is not finished yet or was skipped, it will return `true`.
## meta
```ts
function meta(): TaskMeta
```
Custom [metadata](/api/advanced/metadata) that was attached to the test during its execution. The meta can be attached by assigning a property to the `ctx.task.meta` object during a test run:
```ts {3,6}
import { test } from 'vitest'
test('the validation works correctly', ({ task }) => {
// ...
task.meta.decorated = false
})
```
If the test did not finish running yet, the meta will be an empty object, unless it has static meta:
```ts
test('the validation works correctly', { meta: { decorated: true } })
```
Since Vitest 4.1, Vitest inherits [`meta`](/api/advanced/test-suite#meta) property defined on the [suite](/api/advanced/test-suite).
## result
```ts
function result(): TestResult
```
Test results. If test is not finished yet or was just collected, it will be equal to `TestResultPending`:
```ts
export interface TestResultPending {
/**
* The test was collected, but didn't finish running yet.
*/
readonly state: 'pending'
/**
* Pending tests have no errors.
*/
readonly errors: undefined
}
```
If the test was skipped, the return value will be `TestResultSkipped`:
```ts
interface TestResultSkipped {
/**
* The test was skipped with `skip` or `todo` flag.
* You can see which one was used in the `options.mode` option.
*/
readonly state: 'skipped'
/**
* Skipped tests have no errors.
*/
readonly errors: undefined
/**
* A custom note passed down to `ctx.skip(note)`.
*/
readonly note: string | undefined
}
```
::: tip
If the test was skipped because another test has `only` flag, the `options.mode` will be equal to `skip`.
:::
If the test failed, the return value will be `TestResultFailed`:
```ts
interface TestResultFailed {
/**
* The test failed to execute.
*/
readonly state: 'failed'
/**
* Errors that were thrown during the test execution.
*/
readonly errors: ReadonlyArray<TestError>
}
```
If the test passed, the return value will be `TestResultPassed`:
```ts
interface TestResultPassed {
/**
* The test passed successfully.
*/
readonly state: 'passed'
/**
* Errors that were thrown during the test execution.
*/
readonly errors: ReadonlyArray<TestError> | undefined
}
```
::: warning
Note that the test with `passed` state can still have errors attached - this can happen if `retry` was triggered at least once.
:::
## diagnostic
```ts
function diagnostic(): TestDiagnostic | undefined
```
Useful information about the test like duration, memory usage, etc:
```ts
interface TestDiagnostic {
/**
* If the duration of the test is above `slowTestThreshold`.
*/
readonly slow: boolean
/**
* The amount of memory used by the test in bytes.
* This value is only available if the test was executed with `logHeapUsage` flag.
*/
readonly heap: number | undefined
/**
* The time it takes to execute the test in ms.
*/
readonly duration: number
/**
* The time in ms when the test started.
*/
readonly startTime: number
/**
* The amount of times the test was retried.
*/
readonly retryCount: number
/**
* The amount of times the test was repeated as configured by `repeats` option.
* This value can be lower if the test failed during the repeat and no `retry` is configured.
*/
readonly repeatCount: number
/**
* If test passed on a second retry.
*/
readonly flaky: boolean
}
```
::: info
`diagnostic()` will return `undefined` if the test was not scheduled to run yet.
:::
## annotations
```ts
function annotations(): ReadonlyArray<TestAnnotation>
```
[Test annotations](/guide/test-annotations) added via the [`task.annotate`](/guide/test-context#annotate) API during the test execution.
## artifacts <Version type="experimental">4.0.11</Version> <Experimental /> {#artifacts}
```ts
function artifacts(): ReadonlyArray<TestArtifact>
```
[Test artifacts](/api/advanced/artifacts) recorded via the `recordArtifact` API during the test execution.
## toTestSpecification <Version>4.1.0</Version> {#totestspecification}
```ts
function toTestSpecification(): TestSpecification
```
Returns a new [test specification](/api/advanced/test-specification) that can be used to filter or run this specific test case.
================================================
FILE: docs/api/advanced/test-collection.md
================================================
# TestCollection
`TestCollection` represents a collection of top-level [suites](/api/advanced/test-suite) and [tests](/api/advanced/test-case) in a suite or a module. It also provides useful methods to iterate over itself.
::: info
Most methods return an iterator instead of an array for better performance in case you don't need every item in the collection. If you prefer working with array, you can spread the iterator: `[...children.allSuites()]`.
Also note that the collection itself is an iterator:
```ts
for (const child of module.children) {
console.log(child.type, child.name)
}
```
:::
## size
The number of tests and suites in the collection.
::: warning
This number includes only tests and suites at the top-level, it doesn't include nested suites and tests.
:::
## at
```ts
function at(index: number): TestCase | TestSuite | undefined
```
Returns the test or suite at a specific index. This method accepts negative indexes.
## array
```ts
function array(): (TestCase | TestSuite)[]
```
The same collection but as an array. This is useful if you want to use `Array` methods like `map` and `filter` that are not supported by the `TaskCollection` implementation.
## allSuites
```ts
function allSuites(): Generator<TestSuite, undefined, void>
```
Filters all suites that are part of this collection and its children.
```ts
for (const suite of module.children.allSuites()) {
if (suite.errors().length) {
console.log('failed to collect', suite.errors())
}
}
```
## allTests
```ts
function allTests(state?: TestState): Generator<TestCase, undefined, void>
```
Filters all tests that are part of this collection and its children.
```ts
for (const test of module.children.allTests()) {
if (test.result().state === 'pending') {
console.log('test', test.fullName, 'did not finish')
}
}
```
You can pass down a `state` value to filter tests by the state.
## tests
```ts
function tests(state?: TestState): Generator<TestCase, undefined, void>
```
Filters only the tests that are part of this collection. You can pass down a `state` value to filter tests by the state.
## suites
```ts
function suites(): Generator<TestSuite, undefined, void>
```
Filters only the suites that are part of this collection.
================================================
FILE: docs/api/advanced/test-module.md
================================================
# TestModule
The `TestModule` class represents a single module in a single project. This class is only available in the main thread. Refer to the ["Runner API"](/api/advanced/runner#tasks) if you are working with runtime tasks.
The `TestModule` instance always has a `type` property with the value of `module`. You can use it to distinguish between different task types:
```ts
if (task.type === 'module') {
task // TestModule
}
```
::: warning Extending Suite Methods
The `TestModule` class inherits all methods and properties from the [`TestSuite`](/api/advanced/test-suite). This guide will only list methods and properties unique to the `TestModule`.
:::
## moduleId
This is usually an absolute unix file path (even on Windows). It can be a virtual id if the file is not on the disk. This value corresponds to Vite's `ModuleGraph` id.
```ts
'C:/Users/Documents/project/example.test.ts' // ✅
'/Users/mac/project/example.test.ts' // ✅
'C:\\Users\\Documents\\project\\example.test.ts' // ❌
```
## relativeModuleId
Module id relative to the project. This is the same as `task.name` in the deprecated API.
```ts
'project/example.test.ts' // ✅
'example.test.ts' // ✅
'project\\example.test.ts' // ❌
```
## state
```ts
function state(): TestModuleState
```
Works the same way as [`testSuite.state()`](/api/advanced/test-suite#state), but can also return `queued` if module wasn't executed yet.
## meta <Version>3.1.0</Version> {#meta}
```ts
function meta(): TaskMeta
```
Custom [metadata](/api/advanced/metadata) that was attached to the module during its execution or collection. The meta can be attached by assigning a property to the `task.meta` object during a test run:
```ts {5,10}
import { test } from 'vitest'
describe('the validation works correctly', (task) => {
// assign "decorated" during collection
task.file.meta.decorated = false
test('some test', ({ task }) => {
// assign "decorated" during test run, it will be available
// only in onTestCaseReady hook
task.file.meta.decorated = false
})
})
```
:::tip
If metadata was attached during collection (outside of the `test` function), then it will be available in [`onTestModuleCollected`](./reporters#ontestmodulecollected) hook in the custom reporter.
:::
## diagnostic
```ts
function diagnostic(): ModuleDiagnostic
```
Useful information about the module like duration, memory usage, etc. If the module was not executed yet, all diagnostic values will return `0`.
```ts
interface ModuleDiagnostic {
/**
* The time it takes to import and initiate an environ
gitextract_qnymewnt/ ├── .claude/ │ └── agents/ │ └── vitest-test-writer.md ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ ├── docs.yml │ │ └── feature_request.yml │ ├── PULL_REQUEST_TEMPLATE.md │ ├── actions/ │ │ ├── setup-and-cache/ │ │ │ └── action.yml │ │ └── setup-playwright/ │ │ └── action.yml │ ├── commit-convention.md │ ├── copilot-instructions.md │ ├── renovate.json5 │ └── workflows/ │ ├── ci.yml │ ├── cr.yml │ ├── ecosystem-ci-trigger.yml │ ├── issue-close-require.yml │ ├── issue-labeled.yml │ ├── lock-closed-issues.yml │ └── publish.yml ├── .gitignore ├── .npmrc ├── .tazerc.json ├── .vscode/ │ ├── extensions.json │ ├── settings.json │ └── tasks.json ├── AGENTS.md ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.json ├── LICENSE ├── README.md ├── SECURITY.md ├── docs/ │ ├── .vitepress/ │ │ ├── blog.data.ts │ │ ├── components/ │ │ │ ├── Advanced.vue │ │ │ ├── ArrowDown.vue │ │ │ ├── BlogIndex.vue │ │ │ ├── Box.vue │ │ │ ├── CRoot.vue │ │ │ ├── CourseLink.vue │ │ │ ├── Deprecated.vue │ │ │ ├── Experimental.vue │ │ │ ├── FeaturesList.vue │ │ │ ├── HomePage.vue │ │ │ ├── ListItem.vue │ │ │ └── Version.vue │ │ ├── config.ts │ │ ├── contributors.ts │ │ ├── meta.ts │ │ ├── scripts/ │ │ │ ├── cli-generator.ts │ │ │ ├── fetch-avatars.ts │ │ │ ├── pwa.ts │ │ │ └── transformHead.ts │ │ ├── sponsors.ts │ │ └── theme/ │ │ ├── FeatureGrid.vue │ │ ├── Hero.vue │ │ ├── Home.vue │ │ ├── Intro.vue │ │ ├── index.ts │ │ ├── pwa.ts │ │ └── styles.css │ ├── api/ │ │ ├── advanced/ │ │ │ ├── artifacts.md │ │ │ ├── import-example.md │ │ │ ├── metadata.md │ │ │ ├── plugin.md │ │ │ ├── reporters.md │ │ │ ├── runner.md │ │ │ ├── test-case.md │ │ │ ├── test-collection.md │ │ │ ├── test-module.md │ │ │ ├── test-project.md │ │ │ ├── test-specification.md │ │ │ ├── test-suite.md │ │ │ └── vitest.md │ │ ├── assert-type.md │ │ ├── assert.md │ │ ├── browser/ │ │ │ ├── assertions.md │ │ │ ├── commands.md │ │ │ ├── context.md │ │ │ ├── interactivity.md │ │ │ ├── locators.md │ │ │ ├── react.md │ │ │ ├── svelte.md │ │ │ └── vue.md │ │ ├── describe.md │ │ ├── expect-typeof.md │ │ ├── expect.md │ │ ├── hooks.md │ │ ├── mock.md │ │ ├── test.md │ │ └── vi.md │ ├── blog/ │ │ ├── vitest-3-2.md │ │ ├── vitest-3.md │ │ ├── vitest-4-1.md │ │ └── vitest-4.md │ ├── blog.md │ ├── config/ │ │ ├── alias.md │ │ ├── allowonly.md │ │ ├── api.md │ │ ├── attachmentsdir.md │ │ ├── bail.md │ │ ├── benchmark.md │ │ ├── browser/ │ │ │ ├── api.md │ │ │ ├── commands.md │ │ │ ├── connecttimeout.md │ │ │ ├── detailspanelposition.md │ │ │ ├── enabled.md │ │ │ ├── expect.md │ │ │ ├── headless.md │ │ │ ├── instances.md │ │ │ ├── isolate.md │ │ │ ├── locators.md │ │ │ ├── orchestratorscripts.md │ │ │ ├── playwright.md │ │ │ ├── preview.md │ │ │ ├── provider.md │ │ │ ├── screenshotdirectory.md │ │ │ ├── screenshotfailures.md │ │ │ ├── testerhtmlpath.md │ │ │ ├── trace.md │ │ │ ├── trackunhandlederrors.md │ │ │ ├── ui.md │ │ │ ├── viewport.md │ │ │ └── webdriverio.md │ │ ├── cache.md │ │ ├── chaiconfig.md │ │ ├── clearmocks.md │ │ ├── coverage.md │ │ ├── css.md │ │ ├── dangerouslyignoreunhandlederrors.md │ │ ├── deps.md │ │ ├── detectasyncleaks.md │ │ ├── diff.md │ │ ├── dir.md │ │ ├── disableconsoleintercept.md │ │ ├── env.md │ │ ├── environment.md │ │ ├── environmentoptions.md │ │ ├── exclude.md │ │ ├── execargv.md │ │ ├── expandsnapshotdiff.md │ │ ├── expect.md │ │ ├── experimental.md │ │ ├── faketimers.md │ │ ├── fileparallelism.md │ │ ├── forcereruntriggers.md │ │ ├── globals.md │ │ ├── globalsetup.md │ │ ├── hideskippedtests.md │ │ ├── hooktimeout.md │ │ ├── include-source.md │ │ ├── include.md │ │ ├── includetasklocation.md │ │ ├── index.md │ │ ├── isolate.md │ │ ├── logheapusage.md │ │ ├── maxconcurrency.md │ │ ├── maxworkers.md │ │ ├── mockreset.md │ │ ├── mode.md │ │ ├── name.md │ │ ├── onconsolelog.md │ │ ├── onstacktrace.md │ │ ├── onunhandlederror.md │ │ ├── open.md │ │ ├── outputfile.md │ │ ├── passwithnotests.md │ │ ├── pool.md │ │ ├── printconsoletrace.md │ │ ├── projects.md │ │ ├── provide.md │ │ ├── reporters.md │ │ ├── resolvesnapshotpath.md │ │ ├── restoremocks.md │ │ ├── retry.md │ │ ├── root.md │ │ ├── runner.md │ │ ├── sequence.md │ │ ├── server.md │ │ ├── setupfiles.md │ │ ├── silent.md │ │ ├── slowtestthreshold.md │ │ ├── snapshotenvironment.md │ │ ├── snapshotformat.md │ │ ├── snapshotserializers.md │ │ ├── stricttags.md │ │ ├── tags.md │ │ ├── teardowntimeout.md │ │ ├── testnamepattern.md │ │ ├── testtimeout.md │ │ ├── typecheck.md │ │ ├── ui.md │ │ ├── unstubenvs.md │ │ ├── unstubglobals.md │ │ ├── update.md │ │ ├── vmmemorylimit.md │ │ ├── watch.md │ │ └── watchtriggerpatterns.md │ ├── guide/ │ │ ├── advanced/ │ │ │ ├── index.md │ │ │ ├── pool.md │ │ │ ├── reporters.md │ │ │ └── tests.md │ │ ├── browser/ │ │ │ ├── component-testing.md │ │ │ ├── index.md │ │ │ ├── multiple-setups.md │ │ │ ├── trace-view.md │ │ │ ├── visual-regression-testing.md │ │ │ └── why.md │ │ ├── cli-generated.md │ │ ├── cli.md │ │ ├── common-errors.md │ │ ├── comparisons.md │ │ ├── coverage.md │ │ ├── debugging.md │ │ ├── environment.md │ │ ├── examples/ │ │ │ ├── projects-workspace.md │ │ │ └── promise-done.md │ │ ├── extending-matchers.md │ │ ├── features.md │ │ ├── filtering.md │ │ ├── ide.md │ │ ├── improving-performance.md │ │ ├── in-source.md │ │ ├── index.md │ │ ├── lifecycle.md │ │ ├── migration.md │ │ ├── mocking/ │ │ │ ├── classes.md │ │ │ ├── dates.md │ │ │ ├── file-system.md │ │ │ ├── functions.md │ │ │ ├── globals.md │ │ │ ├── modules.md │ │ │ ├── requests.md │ │ │ └── timers.md │ │ ├── mocking.md │ │ ├── open-telemetry.md │ │ ├── parallelism.md │ │ ├── profiling-test-performance.md │ │ ├── projects.md │ │ ├── recipes.md │ │ ├── reporters.md │ │ ├── snapshot.md │ │ ├── test-annotations.md │ │ ├── test-context.md │ │ ├── test-tags.md │ │ ├── testing-types.md │ │ ├── ui.md │ │ ├── using-plugins.md │ │ └── why.md │ ├── index.md │ ├── package.json │ ├── public/ │ │ ├── _headers │ │ ├── new-reporter.webm │ │ └── robots.txt │ ├── pwa-assets.config.ts │ ├── team.md │ ├── todo.md │ ├── tsconfig.json │ └── vite.config.ts ├── eslint.config.js ├── examples/ │ ├── basic/ │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ └── basic.ts │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ └── suite.test.ts.snap │ │ │ ├── basic.test.ts │ │ │ └── suite.test.ts │ │ ├── tsconfig.json │ │ └── vite.config.ts │ ├── fastify/ │ │ ├── mockData.ts │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app.ts │ │ │ └── index.ts │ │ └── test/ │ │ └── app.test.ts │ ├── in-source-test/ │ │ ├── package.json │ │ ├── src/ │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ ├── lit/ │ │ ├── .gitignore │ │ ├── index.html │ │ ├── package.json │ │ ├── src/ │ │ │ └── my-button.ts │ │ ├── test/ │ │ │ └── basic.test.ts │ │ ├── tsconfig.json │ │ └── vite.config.ts │ ├── opentelemetry/ │ │ ├── README.md │ │ ├── docker-compose.yaml │ │ ├── jaeger-config.yml │ │ ├── otel-browser.js │ │ ├── otel.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── basic.test.ts │ │ │ ├── basic.ts │ │ │ └── other.test.ts │ │ └── vite.config.ts │ ├── profiling/ │ │ ├── global-setup.ts │ │ ├── package.json │ │ ├── src/ │ │ │ └── prime-number.ts │ │ ├── test/ │ │ │ └── prime-number.test.ts │ │ └── vitest.config.ts │ ├── projects/ │ │ ├── package.json │ │ ├── packages/ │ │ │ ├── client/ │ │ │ │ ├── components/ │ │ │ │ │ └── Link.tsx │ │ │ │ ├── test/ │ │ │ │ │ └── basic.test.tsx │ │ │ │ ├── tsconfig.json │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.setup.ts │ │ │ └── server/ │ │ │ ├── mockData.ts │ │ │ ├── src/ │ │ │ │ ├── app.ts │ │ │ │ └── index.ts │ │ │ └── test/ │ │ │ └── app.test.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ └── typecheck/ │ ├── package.json │ ├── test/ │ │ ├── normal.test.ts │ │ └── type.test-d.ts │ ├── tsconfig.json │ └── vite.config.ts ├── netlify.toml ├── package.json ├── packages/ │ ├── browser/ │ │ ├── README.md │ │ ├── aria-role.d.ts │ │ ├── context.d.ts │ │ ├── context.js │ │ ├── dummy.js │ │ ├── jest-dom.d.ts │ │ ├── matchers.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── scripts/ │ │ │ └── build-client.js │ │ ├── src/ │ │ │ ├── client/ │ │ │ │ ├── channel.ts │ │ │ │ ├── client.ts │ │ │ │ ├── orchestrator.html │ │ │ │ ├── orchestrator.ts │ │ │ │ ├── public/ │ │ │ │ │ ├── error-catcher.js │ │ │ │ │ └── esm-client-injector.js │ │ │ │ ├── tester/ │ │ │ │ │ ├── context.ts │ │ │ │ │ ├── dialog.ts │ │ │ │ │ ├── expect/ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── toBeChecked.ts │ │ │ │ │ │ ├── toBeEmptyDOMElement.ts │ │ │ │ │ │ ├── toBeEnabled.ts │ │ │ │ │ │ ├── toBeInTheDocument.ts │ │ │ │ │ │ ├── toBeInViewport.ts │ │ │ │ │ │ ├── toBeInvalid.ts │ │ │ │ │ │ ├── toBePartiallyChecked.ts │ │ │ │ │ │ ├── toBeRequired.ts │ │ │ │ │ │ ├── toBeVisible.ts │ │ │ │ │ │ ├── toContainElement.ts │ │ │ │ │ │ ├── toContainHTML.ts │ │ │ │ │ │ ├── toHaveAccessibleDescription.ts │ │ │ │ │ │ ├── toHaveAccessibleErrorMessage.ts │ │ │ │ │ │ ├── toHaveAccessibleName.ts │ │ │ │ │ │ ├── toHaveAttribute.ts │ │ │ │ │ │ ├── toHaveClass.ts │ │ │ │ │ │ ├── toHaveDisplayValue.ts │ │ │ │ │ │ ├── toHaveFocus.ts │ │ │ │ │ │ ├── toHaveFormValues.ts │ │ │ │ │ │ ├── toHaveRole.ts │ │ │ │ │ │ ├── toHaveSelection.ts │ │ │ │ │ │ ├── toHaveStyle.ts │ │ │ │ │ │ ├── toHaveTextContent.ts │ │ │ │ │ │ ├── toHaveValue.ts │ │ │ │ │ │ ├── toMatchScreenshot.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── expect-element.ts │ │ │ │ │ ├── locators/ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── logger.ts │ │ │ │ │ ├── mocker-interceptor.ts │ │ │ │ │ ├── mocker.ts │ │ │ │ │ ├── rpc.ts │ │ │ │ │ ├── runner.ts │ │ │ │ │ ├── snapshot.ts │ │ │ │ │ ├── state.ts │ │ │ │ │ ├── tester-utils.ts │ │ │ │ │ ├── tester.html │ │ │ │ │ └── tester.ts │ │ │ │ ├── tsconfig.json │ │ │ │ ├── ui.ts │ │ │ │ ├── utils.ts │ │ │ │ └── vite.config.ts │ │ │ ├── node/ │ │ │ │ ├── cdp.ts │ │ │ │ ├── commands/ │ │ │ │ │ ├── fs.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── screenshot.ts │ │ │ │ │ ├── screenshotMatcher/ │ │ │ │ │ │ ├── codecs/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── png.ts │ │ │ │ │ │ ├── comparators/ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── pixelmatch.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ │ └── trace.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── middlewares/ │ │ │ │ │ ├── orchestratorMiddleware.ts │ │ │ │ │ ├── testerMiddleware.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── plugin.ts │ │ │ │ ├── plugins/ │ │ │ │ │ └── pluginContext.ts │ │ │ │ ├── project.ts │ │ │ │ ├── projectParent.ts │ │ │ │ ├── rpc.ts │ │ │ │ ├── serverOrchestrator.ts │ │ │ │ ├── serverTester.ts │ │ │ │ ├── state.ts │ │ │ │ └── utils.ts │ │ │ ├── shared/ │ │ │ │ └── screenshotMatcher/ │ │ │ │ └── types.ts │ │ │ └── types.ts │ │ ├── tsconfig.json │ │ └── utils.d.ts │ ├── browser-playwright/ │ │ ├── README.md │ │ ├── context.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── commands/ │ │ │ │ ├── clear.ts │ │ │ │ ├── click.ts │ │ │ │ ├── dragAndDrop.ts │ │ │ │ ├── fill.ts │ │ │ │ ├── hover.ts │ │ │ │ ├── index.ts │ │ │ │ ├── keyboard.ts │ │ │ │ ├── screenshot.ts │ │ │ │ ├── select.ts │ │ │ │ ├── tab.ts │ │ │ │ ├── trace.ts │ │ │ │ ├── type.ts │ │ │ │ ├── upload.ts │ │ │ │ ├── utils.ts │ │ │ │ └── wheel.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locators.ts │ │ │ └── playwright.ts │ │ └── tsconfig.json │ ├── browser-preview/ │ │ ├── README.md │ │ ├── context.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locators.ts │ │ │ └── preview.ts │ │ └── tsconfig.json │ ├── browser-webdriverio/ │ │ ├── README.md │ │ ├── context.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── commands/ │ │ │ │ ├── clear.ts │ │ │ │ ├── click.ts │ │ │ │ ├── dragAndDrop.ts │ │ │ │ ├── fill.ts │ │ │ │ ├── hover.ts │ │ │ │ ├── index.ts │ │ │ │ ├── keyboard.ts │ │ │ │ ├── screenshot.ts │ │ │ │ ├── select.ts │ │ │ │ ├── tab.ts │ │ │ │ ├── type.ts │ │ │ │ ├── upload.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── viewport.ts │ │ │ │ └── wheel.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── locators.ts │ │ │ └── webdriverio.ts │ │ └── tsconfig.json │ ├── coverage-istanbul/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── provider.ts │ │ └── tsconfig.json │ ├── coverage-v8/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── browser.ts │ │ │ ├── index.ts │ │ │ ├── load-provider.ts │ │ │ └── provider.ts │ │ └── tsconfig.json │ ├── expect/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── chai-style-assertions.ts │ │ │ ├── constants.ts │ │ │ ├── custom-matchers.ts │ │ │ ├── index.ts │ │ │ ├── jest-asymmetric-matchers.ts │ │ │ ├── jest-expect.ts │ │ │ ├── jest-extend.ts │ │ │ ├── jest-matcher-utils.ts │ │ │ ├── jest-utils.ts │ │ │ ├── state.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── mocker/ │ │ ├── EXPORTS.md │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── automocker.ts │ │ │ ├── browser/ │ │ │ │ ├── auto-register.ts │ │ │ │ ├── hints.ts │ │ │ │ ├── index.ts │ │ │ │ ├── interceptor-msw.ts │ │ │ │ ├── interceptor-native.ts │ │ │ │ ├── interceptor.ts │ │ │ │ ├── mocker.ts │ │ │ │ ├── register.ts │ │ │ │ └── utils.ts │ │ │ ├── index.ts │ │ │ ├── node/ │ │ │ │ ├── automock.ts │ │ │ │ ├── automockPlugin.ts │ │ │ │ ├── dynamicImportPlugin.ts │ │ │ │ ├── esmWalker.ts │ │ │ │ ├── hoistMocks.ts │ │ │ │ ├── hoistMocksPlugin.ts │ │ │ │ ├── index.ts │ │ │ │ ├── interceptorPlugin.ts │ │ │ │ ├── mockerPlugin.ts │ │ │ │ ├── parsers.ts │ │ │ │ ├── redirect.ts │ │ │ │ ├── resolver.ts │ │ │ │ └── transforms.ts │ │ │ ├── registry.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── pretty-format/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── collections.ts │ │ │ ├── index.ts │ │ │ ├── plugins/ │ │ │ │ ├── AsymmetricMatcher.ts │ │ │ │ ├── DOMCollection.ts │ │ │ │ ├── DOMElement.ts │ │ │ │ ├── Immutable.ts │ │ │ │ ├── ReactElement.ts │ │ │ │ ├── ReactTestComponent.ts │ │ │ │ └── lib/ │ │ │ │ ├── escapeHTML.ts │ │ │ │ └── markup.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── runner/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── artifact.ts │ │ │ ├── collect.ts │ │ │ ├── context.ts │ │ │ ├── errors.ts │ │ │ ├── fixture.ts │ │ │ ├── hooks.ts │ │ │ ├── index.ts │ │ │ ├── map.ts │ │ │ ├── run.ts │ │ │ ├── setup.ts │ │ │ ├── suite.ts │ │ │ ├── test-state.ts │ │ │ ├── types/ │ │ │ │ ├── runner.ts │ │ │ │ └── tasks.ts │ │ │ ├── types.ts │ │ │ └── utils/ │ │ │ ├── chain.ts │ │ │ ├── collect.ts │ │ │ ├── index.ts │ │ │ ├── limit-concurrency.ts │ │ │ ├── suite.ts │ │ │ ├── tags.ts │ │ │ └── tasks.ts │ │ ├── tsconfig.json │ │ ├── types.d.ts │ │ └── utils.d.ts │ ├── snapshot/ │ │ ├── README.md │ │ ├── environment.d.ts │ │ ├── manager.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── client.ts │ │ │ ├── env/ │ │ │ │ └── node.ts │ │ │ ├── environment.ts │ │ │ ├── index.ts │ │ │ ├── manager.ts │ │ │ ├── port/ │ │ │ │ ├── inlineSnapshot.ts │ │ │ │ ├── mockSerializer.ts │ │ │ │ ├── plugins.ts │ │ │ │ ├── rawSnapshot.ts │ │ │ │ ├── state.ts │ │ │ │ └── utils.ts │ │ │ └── types/ │ │ │ ├── environment.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── spy/ │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── ui/ │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── browser.dev.js │ │ ├── client/ │ │ │ ├── App.vue │ │ │ ├── components/ │ │ │ │ ├── AnnotationAttachmentImage.vue │ │ │ │ ├── Badge.vue │ │ │ │ ├── BrowserIframe.vue │ │ │ │ ├── ClosedDetailsHeader.vue │ │ │ │ ├── CodeMirrorContainer.vue │ │ │ │ ├── ConnectionOverlay.vue │ │ │ │ ├── Coverage.vue │ │ │ │ ├── Dashboard.vue │ │ │ │ ├── DetailsHeaderButtons.vue │ │ │ │ ├── FailureScreenshot.vue │ │ │ │ ├── FileDetails.vue │ │ │ │ ├── FilterStatus.vue │ │ │ │ ├── IconAction.vue │ │ │ │ ├── IconButton.vue │ │ │ │ ├── Modal.vue │ │ │ │ ├── ModuleGraphImportBreakdown.vue │ │ │ │ ├── ModuleTransformResultView.vue │ │ │ │ ├── Navigation.vue │ │ │ │ ├── ProgressBar.vue │ │ │ │ ├── ResultsPanel.vue │ │ │ │ ├── StatusIcon.vue │ │ │ │ ├── artifacts/ │ │ │ │ │ ├── ArtifactTemplate.vue │ │ │ │ │ ├── Artifacts.vue │ │ │ │ │ └── visual-regression/ │ │ │ │ │ ├── SmallTabs.spec.ts │ │ │ │ │ ├── SmallTabs.vue │ │ │ │ │ ├── SmallTabsPane.vue │ │ │ │ │ ├── VisualRegression.spec.ts │ │ │ │ │ ├── VisualRegression.vue │ │ │ │ │ ├── VisualRegressionImage.vue │ │ │ │ │ ├── VisualRegressionImageContainer.vue │ │ │ │ │ ├── VisualRegressionSlider.spec.ts │ │ │ │ │ └── VisualRegressionSlider.vue │ │ │ │ ├── dashboard/ │ │ │ │ │ ├── DashboardEntry.spec.ts │ │ │ │ │ ├── DashboardEntry.vue │ │ │ │ │ ├── ErrorEntry.vue │ │ │ │ │ ├── TestFilesEntry.vue │ │ │ │ │ ├── TestsEntry.vue │ │ │ │ │ └── TestsFilesContainer.vue │ │ │ │ ├── explorer/ │ │ │ │ │ ├── Explorer.vue │ │ │ │ │ └── ExplorerItem.vue │ │ │ │ └── views/ │ │ │ │ ├── ScreenshotError.vue │ │ │ │ ├── ViewConsoleOutput.vue │ │ │ │ ├── ViewConsoleOutputEntry.spec.ts │ │ │ │ ├── ViewConsoleOutputEntry.vue │ │ │ │ ├── ViewEditor.vue │ │ │ │ ├── ViewModuleGraph.vue │ │ │ │ ├── ViewReport.spec.ts │ │ │ │ ├── ViewReport.vue │ │ │ │ ├── ViewReportError.vue │ │ │ │ └── ViewTestReport.vue │ │ │ ├── composables/ │ │ │ │ ├── api.ts │ │ │ │ ├── attachments.ts │ │ │ │ ├── browser.ts │ │ │ │ ├── client/ │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── state.ts │ │ │ │ │ └── static.ts │ │ │ │ ├── codemirror.ts │ │ │ │ ├── dark.ts │ │ │ │ ├── error.ts │ │ │ │ ├── explorer/ │ │ │ │ │ ├── collapse.ts │ │ │ │ │ ├── collector.ts │ │ │ │ │ ├── expand.ts │ │ │ │ │ ├── filter.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── search.ts │ │ │ │ │ ├── state.ts │ │ │ │ │ ├── tree.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── index.ts │ │ │ │ ├── location.ts │ │ │ │ ├── module-graph.ts │ │ │ │ ├── navigation.ts │ │ │ │ ├── params.ts │ │ │ │ └── small-tabs.ts │ │ │ ├── constants.ts │ │ │ ├── global-setup.ts │ │ │ ├── main.ts │ │ │ ├── pages/ │ │ │ │ └── index.vue │ │ │ ├── shim.d.ts │ │ │ ├── styles/ │ │ │ │ └── main.css │ │ │ ├── test.ts │ │ │ └── utils/ │ │ │ ├── escape.ts │ │ │ └── task.ts │ │ ├── explorer.md │ │ ├── index.html │ │ ├── node/ │ │ │ ├── index.ts │ │ │ ├── reporter.ts │ │ │ └── tsconfig.json │ │ ├── package.json │ │ ├── reporter.d.ts │ │ ├── rollup.config.js │ │ ├── shim.d.ts │ │ ├── tsconfig.json │ │ ├── types.ts │ │ ├── vite.config.ts │ │ └── vitest.config.ts │ ├── utils/ │ │ ├── README.md │ │ ├── diff.d.ts │ │ ├── error.d.ts │ │ ├── helpers.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── source-map.ts │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── diff/ │ │ │ │ ├── cleanupSemantic.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── diffLines.ts │ │ │ │ ├── diffStrings.ts │ │ │ │ ├── getAlignedDiffs.ts │ │ │ │ ├── getType.ts │ │ │ │ ├── index.ts │ │ │ │ ├── joinAlignedDiffs.ts │ │ │ │ ├── normalizeDiffOptions.ts │ │ │ │ ├── printDiffs.ts │ │ │ │ └── types.ts │ │ │ ├── display.ts │ │ │ ├── error.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── nanoid.ts │ │ │ ├── offset.ts │ │ │ ├── random.ts │ │ │ ├── resolver.ts │ │ │ ├── serialize.ts │ │ │ ├── source-map/ │ │ │ │ └── node.ts │ │ │ ├── source-map.ts │ │ │ ├── timers.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── vitest/ │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── browser/ │ │ │ ├── context.d.ts │ │ │ └── context.js │ │ ├── config.d.ts │ │ ├── coverage.d.ts │ │ ├── environments.d.ts │ │ ├── globals.d.ts │ │ ├── import-meta.d.ts │ │ ├── importMeta.d.ts │ │ ├── index.cjs │ │ ├── index.d.cts │ │ ├── jsdom.d.ts │ │ ├── mocker.d.ts │ │ ├── node.d.ts │ │ ├── optional-types.d.ts │ │ ├── package.json │ │ ├── reporters.d.ts │ │ ├── rollup.config.js │ │ ├── runners.d.ts │ │ ├── snapshot.d.ts │ │ ├── src/ │ │ │ ├── api/ │ │ │ │ ├── check.ts │ │ │ │ ├── setup.ts │ │ │ │ └── types.ts │ │ │ ├── constants.ts │ │ │ ├── create/ │ │ │ │ └── browser/ │ │ │ │ ├── creator.ts │ │ │ │ └── examples.ts │ │ │ ├── defaults.ts │ │ │ ├── integrations/ │ │ │ │ ├── chai/ │ │ │ │ │ ├── config.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── poll.ts │ │ │ │ │ └── setup.ts │ │ │ │ ├── coverage.ts │ │ │ │ ├── css/ │ │ │ │ │ └── css-modules.ts │ │ │ │ ├── env/ │ │ │ │ │ ├── edge-runtime.ts │ │ │ │ │ ├── happy-dom.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── jsdom-keys.ts │ │ │ │ │ ├── jsdom.ts │ │ │ │ │ ├── loader.ts │ │ │ │ │ ├── node.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── globals.ts │ │ │ │ ├── inject.ts │ │ │ │ ├── mock/ │ │ │ │ │ ├── date.ts │ │ │ │ │ └── timers.ts │ │ │ │ ├── snapshot/ │ │ │ │ │ ├── chai.ts │ │ │ │ │ └── environments/ │ │ │ │ │ ├── node.ts │ │ │ │ │ └── resolveSnapshotEnvironment.ts │ │ │ │ ├── spy.ts │ │ │ │ ├── vi.ts │ │ │ │ └── wait.ts │ │ │ ├── node/ │ │ │ │ ├── ast-collect.ts │ │ │ │ ├── browser/ │ │ │ │ │ └── sessions.ts │ │ │ │ ├── cache/ │ │ │ │ │ ├── files.ts │ │ │ │ │ ├── fsModuleCache.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── results.ts │ │ │ │ ├── cli/ │ │ │ │ │ ├── cac.ts │ │ │ │ │ ├── cli-api.ts │ │ │ │ │ ├── cli-config.ts │ │ │ │ │ ├── completions.ts │ │ │ │ │ └── filter.ts │ │ │ │ ├── cli.ts │ │ │ │ ├── config/ │ │ │ │ │ ├── resolveConfig.ts │ │ │ │ │ └── serializeConfig.ts │ │ │ │ ├── core.ts │ │ │ │ ├── coverage.ts │ │ │ │ ├── create.ts │ │ │ │ ├── environments/ │ │ │ │ │ ├── fetchModule.ts │ │ │ │ │ ├── normalizeUrl.ts │ │ │ │ │ └── serverRunner.ts │ │ │ │ ├── errors.ts │ │ │ │ ├── git.ts │ │ │ │ ├── globalSetup.ts │ │ │ │ ├── hash.ts │ │ │ │ ├── logger.ts │ │ │ │ ├── module-diagnostic.ts │ │ │ │ ├── packageInstaller.ts │ │ │ │ ├── plugins/ │ │ │ │ │ ├── coverageTransform.ts │ │ │ │ │ ├── cssEnabler.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── metaEnvReplacer.ts │ │ │ │ │ ├── mocks.ts │ │ │ │ │ ├── normalizeURL.ts │ │ │ │ │ ├── optimizer.ts │ │ │ │ │ ├── publicConfig.ts │ │ │ │ │ ├── runnerTransform.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ ├── vitestResolver.ts │ │ │ │ │ └── workspace.ts │ │ │ │ ├── pool.ts │ │ │ │ ├── pools/ │ │ │ │ │ ├── browser.ts │ │ │ │ │ ├── pool.ts │ │ │ │ │ ├── poolRunner.ts │ │ │ │ │ ├── rpc.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── workers/ │ │ │ │ │ ├── forksWorker.ts │ │ │ │ │ ├── threadsWorker.ts │ │ │ │ │ ├── typecheckWorker.ts │ │ │ │ │ ├── vmForksWorker.ts │ │ │ │ │ └── vmThreadsWorker.ts │ │ │ │ ├── printError.ts │ │ │ │ ├── project.ts │ │ │ │ ├── projects/ │ │ │ │ │ └── resolveProjects.ts │ │ │ │ ├── reporters/ │ │ │ │ │ ├── agent.ts │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── benchmark/ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── json-formatter.ts │ │ │ │ │ │ ├── reporter.ts │ │ │ │ │ │ ├── tableRender.ts │ │ │ │ │ │ └── verbose.ts │ │ │ │ │ ├── blob.ts │ │ │ │ │ ├── default.ts │ │ │ │ │ ├── dot.ts │ │ │ │ │ ├── github-actions.ts │ │ │ │ │ ├── hanging-process.ts │ │ │ │ │ ├── html.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── json.ts │ │ │ │ │ ├── junit.ts │ │ │ │ │ ├── renderers/ │ │ │ │ │ │ ├── figures.ts │ │ │ │ │ │ ├── indented-logger.ts │ │ │ │ │ │ ├── utils.ts │ │ │ │ │ │ └── windowedRenderer.ts │ │ │ │ │ ├── reported-tasks.ts │ │ │ │ │ ├── summary.ts │ │ │ │ │ ├── tap-flat.ts │ │ │ │ │ ├── tap.ts │ │ │ │ │ ├── tree.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ └── verbose.ts │ │ │ │ ├── resolver.ts │ │ │ │ ├── sequencers/ │ │ │ │ │ ├── BaseSequencer.ts │ │ │ │ │ ├── RandomSequencer.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── specifications.ts │ │ │ │ ├── state.ts │ │ │ │ ├── stdin.ts │ │ │ │ ├── tags.ts │ │ │ │ ├── test-run.ts │ │ │ │ ├── test-specification.ts │ │ │ │ ├── types/ │ │ │ │ │ ├── benchmark.ts │ │ │ │ │ ├── browser.ts │ │ │ │ │ ├── config.ts │ │ │ │ │ ├── coverage.ts │ │ │ │ │ ├── plugin.ts │ │ │ │ │ ├── reporter.ts │ │ │ │ │ ├── tests.ts │ │ │ │ │ ├── vite.ts │ │ │ │ │ └── worker.ts │ │ │ │ ├── vite.ts │ │ │ │ ├── viteLogger.ts │ │ │ │ ├── watch-filter.ts │ │ │ │ └── watcher.ts │ │ │ ├── paths.ts │ │ │ ├── public/ │ │ │ │ ├── browser.ts │ │ │ │ ├── config.ts │ │ │ │ ├── coverage.ts │ │ │ │ ├── environments.ts │ │ │ │ ├── index.ts │ │ │ │ ├── node.ts │ │ │ │ ├── reporters.ts │ │ │ │ ├── runners.ts │ │ │ │ ├── runtime.ts │ │ │ │ ├── snapshot.ts │ │ │ │ ├── suite.ts │ │ │ │ └── worker.ts │ │ │ ├── runtime/ │ │ │ │ ├── benchmark.ts │ │ │ │ ├── cleanup.ts │ │ │ │ ├── config.ts │ │ │ │ ├── console.ts │ │ │ │ ├── detect-async-leaks.ts │ │ │ │ ├── external-executor.ts │ │ │ │ ├── inspector.ts │ │ │ │ ├── listeners.ts │ │ │ │ ├── moduleRunner/ │ │ │ │ │ ├── bareModuleMocker.ts │ │ │ │ │ ├── cachedResolver.ts │ │ │ │ │ ├── errorCatcher.ts │ │ │ │ │ ├── evaluatedModules.ts │ │ │ │ │ ├── moduleDebug.ts │ │ │ │ │ ├── moduleEvaluator.ts │ │ │ │ │ ├── moduleMocker.ts │ │ │ │ │ ├── moduleRunner.ts │ │ │ │ │ ├── moduleTransport.ts │ │ │ │ │ ├── nativeModuleMocker.ts │ │ │ │ │ ├── startVitestModuleRunner.ts │ │ │ │ │ ├── testModuleRunner.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── nodejsWorkerLoader.ts │ │ │ │ ├── rpc.ts │ │ │ │ ├── runBaseTests.ts │ │ │ │ ├── runVmTests.ts │ │ │ │ ├── runners/ │ │ │ │ │ ├── benchmark.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── test.ts │ │ │ │ ├── setup-common.ts │ │ │ │ ├── setup-node.ts │ │ │ │ ├── types/ │ │ │ │ │ ├── benchmark.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── vm/ │ │ │ │ │ ├── commonjs-executor.ts │ │ │ │ │ ├── esm-executor.ts │ │ │ │ │ ├── file-map.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ └── vite-executor.ts │ │ │ │ ├── worker.ts │ │ │ │ └── workers/ │ │ │ │ ├── base.ts │ │ │ │ ├── forks.ts │ │ │ │ ├── init-forks.ts │ │ │ │ ├── init-threads.ts │ │ │ │ ├── init.ts │ │ │ │ ├── native.ts │ │ │ │ ├── threads.ts │ │ │ │ ├── types.ts │ │ │ │ ├── vm.ts │ │ │ │ ├── vmForks.ts │ │ │ │ └── vmThreads.ts │ │ │ ├── shims.dev.d.ts │ │ │ ├── typecheck/ │ │ │ │ ├── assertType.ts │ │ │ │ ├── collect.ts │ │ │ │ ├── expectTypeOf.ts │ │ │ │ ├── parse.ts │ │ │ │ ├── typechecker.ts │ │ │ │ └── types.ts │ │ │ ├── types/ │ │ │ │ ├── browser.ts │ │ │ │ ├── environment.ts │ │ │ │ ├── general.ts │ │ │ │ ├── global.ts │ │ │ │ ├── happy-dom-options.ts │ │ │ │ ├── jsdom-options.ts │ │ │ │ ├── mocker.ts │ │ │ │ ├── module-locations.ts │ │ │ │ ├── rpc.ts │ │ │ │ ├── ui.ts │ │ │ │ └── worker.ts │ │ │ └── utils/ │ │ │ ├── base.ts │ │ │ ├── colors.ts │ │ │ ├── config-helpers.ts │ │ │ ├── coverage.ts │ │ │ ├── debugger.ts │ │ │ ├── env.ts │ │ │ ├── environments.ts │ │ │ ├── graph.ts │ │ │ ├── memory-limit.ts │ │ │ ├── modules.ts │ │ │ ├── nativeModuleRunner.ts │ │ │ ├── serialization.ts │ │ │ ├── source-map.ts │ │ │ ├── tasks.ts │ │ │ ├── test-helpers.ts │ │ │ ├── timers.ts │ │ │ ├── traces.ts │ │ │ └── workers.ts │ │ ├── suite.d.ts │ │ ├── suppress-warnings.cjs │ │ ├── tsconfig.json │ │ ├── vitest.mjs │ │ └── worker.d.ts │ ├── web-worker/ │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── package.json │ │ ├── pure.d.ts │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── pure.ts │ │ │ ├── runner.ts │ │ │ ├── shared-worker.ts │ │ │ ├── types.ts │ │ │ ├── utils.ts │ │ │ └── worker.ts │ │ └── tsconfig.json │ └── ws-client/ │ ├── package.json │ ├── rollup.config.js │ ├── src/ │ │ ├── index.ts │ │ └── state.ts │ └── tsconfig.json ├── patches/ │ ├── @sinonjs__fake-timers@15.0.0.patch │ ├── acorn@8.11.3.patch │ ├── cac@6.7.14.patch │ ├── istanbul-lib-instrument.patch │ └── istanbul-lib-source-maps.patch ├── pnpm-workspace.yaml ├── scripts/ │ ├── build-utils.js │ ├── explain-types.ts │ ├── publish-ci.ts │ ├── release.ts │ └── update-contributors.ts ├── shims.d.ts ├── test/ │ ├── README.md │ ├── browser/ │ │ ├── README.md │ │ ├── bundled-lib/ │ │ │ ├── package.json │ │ │ └── src/ │ │ │ ├── a.js │ │ │ ├── b.js │ │ │ ├── index.d.ts │ │ │ └── index.js │ │ ├── cjs-lib/ │ │ │ ├── index.js │ │ │ ├── lib.d.ts │ │ │ ├── lib.mjs │ │ │ └── package.json │ │ ├── custom-diff-config.ts │ │ ├── custom-snapshot-env.ts │ │ ├── custom-tester.html │ │ ├── deps/ │ │ │ └── test-dep-error/ │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── docker-compose.yaml │ │ ├── fixtures/ │ │ │ ├── assertion-helper/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── benchmark/ │ │ │ │ ├── basic.bench.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── broken-iframe/ │ │ │ │ ├── submit-form.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── browser-crash/ │ │ │ │ ├── browser-crash.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── error-in-dep/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── expect-dom/ │ │ │ │ ├── setup.ts │ │ │ │ ├── toBeChecked.test.ts │ │ │ │ ├── toBeDisabled.test.ts │ │ │ │ ├── toBeEmptyDOMElement.test.ts │ │ │ │ ├── toBeInTheDocument.test.ts │ │ │ │ ├── toBeInViewport.test.ts │ │ │ │ ├── toBeInvalid.test.ts │ │ │ │ ├── toBePartiallyChecked.test.ts │ │ │ │ ├── toBeRequired.test.ts │ │ │ │ ├── toBeVisible.test.ts │ │ │ │ ├── toContainElement.test.ts │ │ │ │ ├── toContainHTML.test.ts │ │ │ │ ├── toHaveAccessibleDescription.test.ts │ │ │ │ ├── toHaveAccessibleErrorMessage.test.ts │ │ │ │ ├── toHaveAttribute.test.ts │ │ │ │ ├── toHaveClass.test.ts │ │ │ │ ├── toHaveDisplayValue.test.ts │ │ │ │ ├── toHaveFocus.test.ts │ │ │ │ ├── toHaveFormValues.test.ts │ │ │ │ ├── toHaveLength.test.ts │ │ │ │ ├── toHaveRole.test.ts │ │ │ │ ├── toHaveSelection.test.ts │ │ │ │ ├── toHaveStyle.test.ts │ │ │ │ ├── toHaveTextContent.test.ts │ │ │ │ ├── toHaveValue.test.ts │ │ │ │ ├── toMatchScreenshot.test.ts │ │ │ │ ├── utils.ts │ │ │ │ └── vitest.config.js │ │ │ ├── failing/ │ │ │ │ ├── failing.snaphot.test.ts │ │ │ │ ├── failing.test.ts │ │ │ │ ├── src/ │ │ │ │ │ └── error.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── insecure-context/ │ │ │ │ ├── src/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── dynamic-import.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── inspect/ │ │ │ │ ├── math.test.ts │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.config.with-workspace.ts │ │ │ ├── isolate-and-setup-file/ │ │ │ │ ├── a.test.ts │ │ │ │ ├── b.test.ts │ │ │ │ ├── browser-setup.ts │ │ │ │ ├── counter.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── locators/ │ │ │ │ ├── blog.test.tsx │ │ │ │ ├── query.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── locators-custom/ │ │ │ │ ├── basic.test.tsx │ │ │ │ └── vitest.config.ts │ │ │ ├── mocking/ │ │ │ │ ├── automocked.test.ts │ │ │ │ ├── autospying.test.ts │ │ │ │ ├── import-actual-dep.test.ts │ │ │ │ ├── import-actual-in-mock.test.ts │ │ │ │ ├── import-actual-query.test.ts │ │ │ │ ├── import-mock.test.ts │ │ │ │ ├── mocked-__mocks__.test.ts │ │ │ │ ├── mocked-do-mock-factory.test.ts │ │ │ │ ├── mocked-factory-hoisted.test.ts │ │ │ │ ├── mocked-factory.test.ts │ │ │ │ ├── mocked-nested.test.ts │ │ │ │ ├── mocking-dep.test.ts │ │ │ │ ├── not-mocked-nested.test.ts │ │ │ │ ├── not-mocked.test.ts │ │ │ │ ├── service-worker.js │ │ │ │ ├── service-worker.test.ts │ │ │ │ ├── src/ │ │ │ │ │ ├── __mocks__/ │ │ │ │ │ │ └── mocks_calculator.ts │ │ │ │ │ ├── actions.ts │ │ │ │ │ ├── calculator.ts │ │ │ │ │ ├── example.ts │ │ │ │ │ ├── mocks_calculator.ts │ │ │ │ │ ├── mocks_factory.ts │ │ │ │ │ ├── mocks_factory_many.ts │ │ │ │ │ ├── mocks_factory_many_dep1.ts │ │ │ │ │ ├── mocks_factory_many_dep2.ts │ │ │ │ │ ├── nested_child.ts │ │ │ │ │ └── nested_parent.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── mocking-out-of-root/ │ │ │ │ ├── project1/ │ │ │ │ │ ├── basic.test.js │ │ │ │ │ ├── imported-test.js │ │ │ │ │ ├── lib.js │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── project2/ │ │ │ │ │ └── index.js │ │ │ │ └── project3/ │ │ │ │ ├── imported-test.js │ │ │ │ └── lib.js │ │ │ ├── mocking-watch/ │ │ │ │ ├── 1_mocked-on-watch-change.test.ts │ │ │ │ ├── 2_not-mocked-import.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── multiple-different-configs/ │ │ │ │ ├── basic.test.js │ │ │ │ ├── customTester.html │ │ │ │ └── vitest.config.js │ │ │ ├── playwright-connect/ │ │ │ │ ├── basic.test.js │ │ │ │ └── vitest.config.js │ │ │ ├── print-logs/ │ │ │ │ ├── test/ │ │ │ │ │ ├── dialog.test.ts │ │ │ │ │ └── logs.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── project-name-encoding/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── server-url/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── setup-file/ │ │ │ │ ├── browser-setup.ts │ │ │ │ ├── module-equality.test.ts │ │ │ │ ├── source.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── timeout/ │ │ │ │ ├── timeout.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── timeout-hooks/ │ │ │ │ ├── hooks-timeout.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── trace-mark/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── trace-view/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── failing.special.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── unhandled/ │ │ │ │ ├── throw-unhandled-error.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── unhandled-non-error/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── update-snapshot/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ ├── basic.test.ts.snap │ │ │ │ │ └── custom/ │ │ │ │ │ └── my_snapshot │ │ │ │ ├── basic-fixture.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── user-event/ │ │ │ │ ├── cleanup-retry.test.ts │ │ │ │ ├── cleanup1.test.ts │ │ │ │ ├── cleanup2.test.ts │ │ │ │ ├── clipboard.test.ts │ │ │ │ ├── keyboard.test.ts │ │ │ │ ├── vitest.config.ts │ │ │ │ └── wheel.test.ts │ │ │ ├── viewport/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ └── worker/ │ │ │ ├── src/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── worker-dynamic-dep.ts │ │ │ │ └── worker.ts │ │ │ └── vitest.config.ts │ │ ├── injected.ts │ │ ├── package.json │ │ ├── settings.ts │ │ ├── setup.unit.ts │ │ ├── specs/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── expect-element-no-awaited.test.ts.snap │ │ │ │ └── update-snapshot.test.ts.snap │ │ │ ├── assertion-helper.test.ts │ │ │ ├── bail-out.test.ts │ │ │ ├── benchmark.test.ts │ │ │ ├── errors.test.ts │ │ │ ├── expect-dom.test.ts │ │ │ ├── expect-element-no-awaited.test.ts │ │ │ ├── filter.test.ts │ │ │ ├── fix-4686.test.ts │ │ │ ├── insecure-context.test.ts │ │ │ ├── inspect.test.ts │ │ │ ├── locators.test.ts │ │ │ ├── mocking.test.ts │ │ │ ├── multiple-different-configs.test.ts │ │ │ ├── playwright-connect.test.ts │ │ │ ├── playwright-trace-mark.test.ts │ │ │ ├── playwright-trace.test.ts │ │ │ ├── project-name-encoding.test.ts │ │ │ ├── runner.test.ts │ │ │ ├── server-url.test.ts │ │ │ ├── setup-file.test.ts │ │ │ ├── to-match-screenshot.test.ts │ │ │ ├── update-snapshot.test.ts │ │ │ ├── utils.ts │ │ │ ├── viewport.test.ts │ │ │ └── worker.test.ts │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── _calculator.ts │ │ │ ├── actions.ts │ │ │ ├── blog-app/ │ │ │ │ └── blog.tsx │ │ │ ├── button.css │ │ │ ├── calculator.ts │ │ │ ├── createNode.ts │ │ │ ├── dynamic.ts │ │ │ └── env.ts │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── custom/ │ │ │ │ │ └── my_snapshot │ │ │ │ ├── snapshot.test.ts.snap │ │ │ │ └── utils.test.ts.snap │ │ │ ├── another.test.ts │ │ │ ├── basic.test.ts │ │ │ ├── cdp.test-d.ts │ │ │ ├── cdp.test.ts │ │ │ ├── cjs-lib.test.ts │ │ │ ├── commands.test.ts │ │ │ ├── dom.test.ts │ │ │ ├── dynamic-module.test.ts │ │ │ ├── env.test.ts │ │ │ ├── expect-element.test.ts │ │ │ ├── findElement.test.ts │ │ │ ├── iframe.test.ts │ │ │ ├── injected.test.ts │ │ │ ├── mocking.test.ts │ │ │ ├── polyfill-lib.test.ts │ │ │ ├── server-headers.test.ts │ │ │ ├── snapshot.test.ts │ │ │ ├── tags.test.ts │ │ │ ├── timers.test.ts │ │ │ ├── userEvent.test.ts │ │ │ ├── utils.test.ts │ │ │ └── viewport.test.ts │ │ ├── tsconfig.json │ │ ├── vitest.config-basepath.mts │ │ ├── vitest.config.mts │ │ └── vitest.config.unit.mts │ ├── cli/ │ │ ├── .gitignore │ │ ├── custom.ts │ │ ├── deps/ │ │ │ ├── dep-invalid/ │ │ │ │ └── package.json │ │ │ ├── dep-simple/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── dep-url/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── error/ │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ ├── transpiled-inline.js │ │ │ │ ├── transpiled-inline.ts │ │ │ │ ├── transpiled.js │ │ │ │ ├── transpiled.ts │ │ │ │ └── ts.ts │ │ │ ├── linked/ │ │ │ │ ├── index.ts │ │ │ │ └── package.json │ │ │ └── pkg-reporter/ │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── dts/ │ │ │ ├── _shared/ │ │ │ │ ├── happy-dom-patch.ts │ │ │ │ └── tsconfig.patch.json │ │ │ ├── browser-playwright/ │ │ │ │ ├── package.json │ │ │ │ ├── src/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── tsconfig.json │ │ │ │ └── vite.config.ts │ │ │ ├── config/ │ │ │ │ ├── package.json │ │ │ │ ├── tsconfig.json │ │ │ │ └── vite.config.ts │ │ │ ├── exact-optional-property/ │ │ │ │ ├── package.json │ │ │ │ ├── src/ │ │ │ │ │ ├── reporter.ts │ │ │ │ │ └── runner.ts │ │ │ │ └── tsconfig.json │ │ │ └── fixture-extend/ │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ └── repro.ts │ │ │ ├── tsconfig.check.json │ │ │ └── tsconfig.json │ │ ├── fixtures/ │ │ │ ├── assertion-helper/ │ │ │ │ └── basic.test.ts │ │ │ ├── bail-race/ │ │ │ │ ├── a.test.ts │ │ │ │ └── b.test.ts │ │ │ ├── basic/ │ │ │ │ └── basic.test.ts │ │ │ ├── benchmarking/ │ │ │ │ ├── basic/ │ │ │ │ │ ├── base.bench.ts │ │ │ │ │ ├── mode.bench.ts │ │ │ │ │ ├── only.bench.ts │ │ │ │ │ ├── should-not-run.test-d.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── compare/ │ │ │ │ │ ├── basic.bench.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── reporter/ │ │ │ │ │ ├── multiple.bench.ts │ │ │ │ │ ├── summary.bench.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ └── sequential/ │ │ │ │ ├── f1.bench.ts │ │ │ │ ├── f2.bench.ts │ │ │ │ ├── helper.ts │ │ │ │ ├── setup.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── browser-init/ │ │ │ │ ├── package.json │ │ │ │ └── vitest.config.ts │ │ │ ├── browser-multiple/ │ │ │ │ ├── basic.test.js │ │ │ │ ├── package.json │ │ │ │ └── vitest.config.ts │ │ │ ├── caching/ │ │ │ │ ├── dynamic-cache-key/ │ │ │ │ │ ├── replaced.test.js │ │ │ │ │ ├── vitest.config.bails.js │ │ │ │ │ ├── vitest.config.fails.js │ │ │ │ │ └── vitest.config.passes.js │ │ │ │ └── import-meta-glob/ │ │ │ │ ├── glob.test.js │ │ │ │ └── vitest.config.js │ │ │ ├── cancel-run/ │ │ │ │ ├── blocked-test-cases.test.ts │ │ │ │ └── blocked-thread.test.ts │ │ │ ├── config/ │ │ │ │ ├── bail/ │ │ │ │ │ ├── test/ │ │ │ │ │ │ ├── first.test.ts │ │ │ │ │ │ └── second.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── browser-custom-html/ │ │ │ │ │ ├── browser-basic.test.ts │ │ │ │ │ ├── browser-custom.test.ts │ │ │ │ │ ├── custom-html.html │ │ │ │ │ ├── vitest.config.correct.ts │ │ │ │ │ ├── vitest.config.custom-transformIndexHtml.ts │ │ │ │ │ ├── vitest.config.default-transformIndexHtml.ts │ │ │ │ │ ├── vitest.config.error-hook.ts │ │ │ │ │ └── vitest.config.non-existing.ts │ │ │ │ ├── browser-define/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ └── watch-trigger-pattern/ │ │ │ │ ├── folder/ │ │ │ │ │ └── fs/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── text.txt │ │ │ │ └── vitest.config.ts │ │ │ ├── config-loader/ │ │ │ │ ├── browser/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── node/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── console/ │ │ │ │ ├── trace.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── create-vitest/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── custom-file-env/ │ │ │ │ └── custom-file-env.test.ts │ │ │ ├── custom-pool/ │ │ │ │ ├── pool/ │ │ │ │ │ └── custom-pool.ts │ │ │ │ ├── tests/ │ │ │ │ │ ├── custom-not-run.spec.ts │ │ │ │ │ └── custom-run.threads.spec.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── custom-runner/ │ │ │ │ ├── custom-runner.test.ts │ │ │ │ ├── test-runner.ts │ │ │ │ ├── utils.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── dotted-files/ │ │ │ │ └── .cache/ │ │ │ │ └── projects/ │ │ │ │ └── test/ │ │ │ │ └── should-run.test.ts │ │ │ ├── expect-soft/ │ │ │ │ ├── expects/ │ │ │ │ │ └── soft.test.ts │ │ │ │ └── vite.config.ts │ │ │ ├── fails/ │ │ │ │ ├── .dot-folder/ │ │ │ │ │ └── dot-test.test.ts │ │ │ │ ├── async-assertion.test.ts │ │ │ │ ├── each-timeout.test.ts │ │ │ │ ├── empty.test.ts │ │ │ │ ├── expect-soft.test.ts │ │ │ │ ├── expect-unreachable.test.ts │ │ │ │ ├── expect.test.ts │ │ │ │ ├── exports-error.test.js │ │ │ │ ├── hook-timeout.test.ts │ │ │ │ ├── hooks-called.test.ts │ │ │ │ ├── hooks-fail-afterAll.test.ts │ │ │ │ ├── hooks-fail-afterEach.test.ts │ │ │ │ ├── hooks-fail-beforeAll.test.ts │ │ │ │ ├── hooks-fail-beforeEach.test.ts │ │ │ │ ├── hooks-timeout-before-hook-cleanup-callback.test.ts │ │ │ │ ├── mock-import-proxy-module.test.ts │ │ │ │ ├── nested-suite.test.ts │ │ │ │ ├── no-assertions.test.ts │ │ │ │ ├── node-browser-context.test.ts │ │ │ │ ├── poll-no-awaited.test.ts │ │ │ │ ├── primitive-error.test.ts │ │ │ │ ├── proxy-module.ts │ │ │ │ ├── skip-conditional.test.ts │ │ │ │ ├── snapshot-with-not.test.ts │ │ │ │ ├── stall.test.ts │ │ │ │ ├── test-extend/ │ │ │ │ │ ├── circular-dependency.test.ts │ │ │ │ │ ├── fixture-error.test.ts │ │ │ │ │ ├── fixture-rest-params.test.ts │ │ │ │ │ ├── fixture-rest-props.test.ts │ │ │ │ │ ├── fixture-without-destructuring.test.ts │ │ │ │ │ ├── test-rest-params.test.ts │ │ │ │ │ ├── test-rest-props.test.ts │ │ │ │ │ └── test-without-destructuring.test.ts │ │ │ │ ├── test-timeout.test.ts │ │ │ │ ├── unhandled-suite.test.ts │ │ │ │ ├── unhandled.test.ts │ │ │ │ └── vite.config.ts │ │ │ ├── file-tags/ │ │ │ │ ├── error-file-one-line-comment.test.ts │ │ │ │ ├── error-file-tags.test.ts │ │ │ │ ├── valid-file-one-line-comment.test.ts │ │ │ │ └── valid-file-tags.test.ts │ │ │ ├── forks-channel/ │ │ │ │ ├── process-send.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── git-changed/ │ │ │ │ ├── related/ │ │ │ │ │ ├── deep-related-exports.test.ts │ │ │ │ │ ├── deep-related-imports.test.ts │ │ │ │ │ ├── not-related.test.ts │ │ │ │ │ ├── related.test.ts │ │ │ │ │ ├── src/ │ │ │ │ │ │ ├── sourceA.ts │ │ │ │ │ │ ├── sourceB.ts │ │ │ │ │ │ ├── sourceC.ts │ │ │ │ │ │ └── sourceD.ts │ │ │ │ │ └── vitest.config.js │ │ │ │ └── workspace/ │ │ │ │ ├── package.json │ │ │ │ ├── packages/ │ │ │ │ │ ├── packageA/ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── index.test.js │ │ │ │ │ │ └── vitest.config.mjs │ │ │ │ │ └── packageB/ │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index.test.js │ │ │ │ │ └── vitest.config.mjs │ │ │ │ └── vitest.config.mjs │ │ │ ├── global-setup/ │ │ │ │ ├── globalSetup/ │ │ │ │ │ ├── another-vite-instance.ts │ │ │ │ │ ├── default-export.js │ │ │ │ │ ├── named-exports.js │ │ │ │ │ ├── server.ts │ │ │ │ │ ├── ts-with-imports.ts │ │ │ │ │ └── update-env.ts │ │ │ │ ├── index.html │ │ │ │ ├── setupFiles/ │ │ │ │ │ ├── add-something-to-global.ts │ │ │ │ │ └── without-relative-path-prefix.ts │ │ │ │ └── test/ │ │ │ │ ├── global-setup.test.ts │ │ │ │ └── setup-files.test.ts │ │ │ ├── global-setup-fail/ │ │ │ │ ├── example.test.ts │ │ │ │ ├── globalSetup/ │ │ │ │ │ └── error.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── inspect/ │ │ │ │ ├── math.test.ts │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.config.ts.timestamp-1713887058308-b154731a64b17.mjs │ │ │ ├── invalid-package/ │ │ │ │ ├── mock-bad-dep.test.ts │ │ │ │ ├── mock-wrapper-and-bad-dep.test.ts │ │ │ │ ├── mock-wrapper.test.ts │ │ │ │ └── wrapper.ts │ │ │ ├── list/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── custom.config.ts │ │ │ │ ├── describe-error.test.ts │ │ │ │ ├── fail.config.ts │ │ │ │ ├── math.test.ts │ │ │ │ ├── top-level-error.test.ts │ │ │ │ ├── type.test-d.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── location-filters/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── math-with-dashes-in-name.test.ts │ │ │ │ ├── math.test.ts │ │ │ │ ├── no-task-location.config.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── mocker/ │ │ │ │ ├── automock/ │ │ │ │ │ ├── index.html │ │ │ │ │ ├── index.js │ │ │ │ │ └── test.js │ │ │ │ ├── autospy/ │ │ │ │ │ ├── index.html │ │ │ │ │ ├── index.js │ │ │ │ │ └── test.js │ │ │ │ ├── manual-mock/ │ │ │ │ │ ├── index.html │ │ │ │ │ ├── index.js │ │ │ │ │ └── test.js │ │ │ │ └── redirect/ │ │ │ │ ├── __mocks__/ │ │ │ │ │ └── test.js │ │ │ │ ├── index.html │ │ │ │ ├── index.js │ │ │ │ └── test.js │ │ │ ├── network-imports/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── public/ │ │ │ │ └── slash@3.0.0.js │ │ │ ├── no-module-runner/ │ │ │ │ ├── jsSetup.js │ │ │ │ ├── package.json │ │ │ │ ├── src/ │ │ │ │ │ ├── __mocks__/ │ │ │ │ │ │ └── redirect.ts │ │ │ │ │ ├── basic.ts │ │ │ │ │ ├── dependency.ts │ │ │ │ │ ├── from-async.ts │ │ │ │ │ ├── in-source/ │ │ │ │ │ │ ├── add.ts │ │ │ │ │ │ ├── fibonacci.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── minus.ts │ │ │ │ │ ├── mock-async.ts │ │ │ │ │ ├── mock-js.d.ts │ │ │ │ │ ├── mock-js.js │ │ │ │ │ ├── mock-sync.ts │ │ │ │ │ ├── no-mock.ts │ │ │ │ │ ├── redirect.ts │ │ │ │ │ └── setups.ts │ │ │ │ ├── test/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── suite.test.ts.snap │ │ │ │ │ ├── automock.test.ts │ │ │ │ │ ├── autospy.test.ts │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ ├── manual-mock.test.ts │ │ │ │ │ ├── mock-async-factory.test.ts │ │ │ │ │ ├── redirect-mock.test.ts │ │ │ │ │ └── suite.test.ts │ │ │ │ ├── tsSetup.ts │ │ │ │ ├── tsconfig.json │ │ │ │ └── vitest.config.ts │ │ │ ├── no-unexpected-logging/ │ │ │ │ ├── fixture-1.test.ts │ │ │ │ ├── fixture-10.test.ts │ │ │ │ ├── fixture-11.test.ts │ │ │ │ ├── fixture-12.test.ts │ │ │ │ ├── fixture-2.test.ts │ │ │ │ ├── fixture-3.test.ts │ │ │ │ ├── fixture-4.test.ts │ │ │ │ ├── fixture-5.test.ts │ │ │ │ ├── fixture-6.test.ts │ │ │ │ ├── fixture-7.test.ts │ │ │ │ ├── fixture-8.test.ts │ │ │ │ └── fixture-9.test.ts │ │ │ ├── optimize-deps/ │ │ │ │ ├── ssr.test.ts │ │ │ │ └── web.test.ts │ │ │ ├── otel-tests/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── otel.browser.sdk.js │ │ │ │ ├── otel.sdk.js │ │ │ │ └── vitest.config.ts │ │ │ ├── path-filter/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── plugin/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── project/ │ │ │ │ ├── packages/ │ │ │ │ │ ├── project_1/ │ │ │ │ │ │ └── base.test.ts │ │ │ │ │ ├── project_2/ │ │ │ │ │ │ └── base.test.ts │ │ │ │ │ └── space_1/ │ │ │ │ │ └── base.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── public-api/ │ │ │ │ ├── custom.spec.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── reported-tasks/ │ │ │ │ └── 1_first.test.ts │ │ │ ├── reporters/ │ │ │ │ ├── .gitignore │ │ │ │ ├── all-passing-or-skipped.test.ts │ │ │ │ ├── all-skipped.test.ts │ │ │ │ ├── basic/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.override.js │ │ │ │ ├── better-testsuite-name/ │ │ │ │ │ ├── space-1/ │ │ │ │ │ │ └── test/ │ │ │ │ │ │ └── base.test.ts │ │ │ │ │ ├── space-2/ │ │ │ │ │ │ └── test/ │ │ │ │ │ │ └── base.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── code-frame-line-limit.test.ts │ │ │ │ ├── console-interleave.test.ts │ │ │ │ ├── console-simple.test.ts │ │ │ │ ├── console-some-failing.test.ts │ │ │ │ ├── console.test.ts │ │ │ │ ├── custom-diff-config.test.ts │ │ │ │ ├── custom-diff-config.ts │ │ │ │ ├── custom-error/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── default/ │ │ │ │ │ ├── a.test.ts │ │ │ │ │ ├── b1.test.ts │ │ │ │ │ ├── b2.test.ts │ │ │ │ │ ├── print-index.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── duration/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── error-props/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── error-to-json.test.ts │ │ │ │ ├── error.test.ts │ │ │ │ ├── function-as-name.bench.ts │ │ │ │ ├── function-as-name.test.ts │ │ │ │ ├── github-actions/ │ │ │ │ │ └── flaky/ │ │ │ │ │ ├── math.spec.ts │ │ │ │ │ └── network.spec.ts │ │ │ │ ├── implementations/ │ │ │ │ │ ├── custom-reporter.js │ │ │ │ │ └── custom-reporter.ts │ │ │ │ ├── import-durations-25ms-throws.ts │ │ │ │ ├── import-durations-25ms.ts │ │ │ │ ├── import-durations-50ms.ts │ │ │ │ ├── import-durations-throws.test.ts │ │ │ │ ├── import-durations.test.ts │ │ │ │ ├── indicator-position.test.js │ │ │ │ ├── invalid-diff-config.ts │ │ │ │ ├── json-fail-import.test.ts │ │ │ │ ├── json-fail.test.ts │ │ │ │ ├── junit-cli-options/ │ │ │ │ │ ├── sample.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── long-loading-task.test.ts │ │ │ │ ├── many-errors/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── merge-errors/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── merge-reports/ │ │ │ │ │ ├── first.test.ts │ │ │ │ │ ├── second.test.ts │ │ │ │ │ └── vitest.config.js │ │ │ │ ├── merge-reports-module-graph/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ ├── second.test.ts │ │ │ │ │ ├── sub/ │ │ │ │ │ │ ├── format.ts │ │ │ │ │ │ └── subject.ts │ │ │ │ │ ├── util.ts │ │ │ │ │ └── vitest.config.js │ │ │ │ ├── metadata/ │ │ │ │ │ ├── metadata.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── ok.test.ts │ │ │ │ ├── pass-and-skip-test-suites.test.ts │ │ │ │ ├── project-name/ │ │ │ │ │ ├── example.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── repeats.test.ts │ │ │ │ ├── reporter-error/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── retry.test.ts │ │ │ │ ├── some-failing.test.ts │ │ │ │ ├── suite-hook-failure/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── test-for-title.test.ts │ │ │ │ ├── verbose/ │ │ │ │ │ ├── example-1.test.ts │ │ │ │ │ └── example-2.test.ts │ │ │ │ ├── vitest.config.ts │ │ │ │ └── with-syntax-error.test.js │ │ │ ├── restricted-fs/ │ │ │ │ ├── src/ │ │ │ │ │ └── math.js │ │ │ │ ├── tests/ │ │ │ │ │ └── basic.spec.js │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.setup.js │ │ │ ├── retry-config/ │ │ │ │ └── vitest.config.ts │ │ │ ├── rollup-error/ │ │ │ │ ├── not-found-export.test.ts │ │ │ │ ├── not-found-package.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── setup-files/ │ │ │ │ ├── console-setup.ts │ │ │ │ ├── empty-setup.ts │ │ │ │ └── empty.test.ts │ │ │ ├── skip-note/ │ │ │ │ └── basic.test.ts │ │ │ ├── ssr-runner/ │ │ │ │ ├── basic.test.ts │ │ │ │ ├── test-runner.js │ │ │ │ └── vitest.config.ts │ │ │ ├── ssr-runner-project/ │ │ │ │ ├── project/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ ├── test-runner.js │ │ │ │ │ └── vitest.config.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── stacktraces/ │ │ │ │ ├── add-in-imba.test.imba │ │ │ │ ├── add-in-js.test.js │ │ │ │ ├── add.test.ts │ │ │ │ ├── error-in-deps.test.js │ │ │ │ ├── error-in-package.test.js │ │ │ │ ├── error-with-stack.test.js │ │ │ │ ├── foo.js │ │ │ │ ├── frame.spec.imba │ │ │ │ ├── mocked-global.test.js │ │ │ │ ├── mocked-imported.test.js │ │ │ │ ├── mocked-imported.test.ts │ │ │ │ ├── require-assertions.test.js │ │ │ │ ├── reset-modules.test.ts │ │ │ │ ├── setup.js │ │ │ │ ├── utils.ts │ │ │ │ └── vite.config.ts │ │ │ ├── stacktraces-custom-helper/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── helper.ts │ │ │ ├── standalone/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── test-tags/ │ │ │ │ └── basic.test.ts │ │ │ ├── tty/ │ │ │ │ ├── example.test.ts │ │ │ │ ├── example.ts │ │ │ │ ├── math.test.ts │ │ │ │ ├── math.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── vitest.config.js │ │ │ ├── vm-threads/ │ │ │ │ ├── import-external-css-assets.test.js │ │ │ │ ├── module.test.js │ │ │ │ ├── not-found.test.ts │ │ │ │ ├── require-cjs.test.js │ │ │ │ ├── src/ │ │ │ │ │ └── external/ │ │ │ │ │ ├── assets/ │ │ │ │ │ │ └── file2.txt │ │ │ │ │ ├── css/ │ │ │ │ │ │ ├── empty.css │ │ │ │ │ │ ├── processed.css │ │ │ │ │ │ └── processed.module.css │ │ │ │ │ ├── default-cjs.cjs │ │ │ │ │ ├── export-default-cjs.js │ │ │ │ │ ├── export-nested-default-cjs.js │ │ │ │ │ ├── nested-default-cjs.cjs │ │ │ │ │ ├── not-found.js │ │ │ │ │ ├── package-null/ │ │ │ │ │ │ └── package-null.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── primitive-cjs.cjs │ │ │ │ └── vitest.config.ts │ │ │ ├── watch/ │ │ │ │ ├── 42.txt │ │ │ │ ├── example.test.ts │ │ │ │ ├── example.ts │ │ │ │ ├── force-watch/ │ │ │ │ │ └── trigger.js │ │ │ │ ├── global-setup.ts │ │ │ │ ├── math.test.ts │ │ │ │ ├── math.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── windows-drive-case/ │ │ │ │ └── basic.test.ts │ │ │ └── workspace/ │ │ │ ├── api/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vite.custom.config.js │ │ │ ├── config-empty/ │ │ │ │ └── vitest.config.js │ │ │ ├── config-extends/ │ │ │ │ ├── repro.test.js │ │ │ │ └── vitest.config.ts │ │ │ ├── config-import-analysis/ │ │ │ │ ├── dep.ts │ │ │ │ ├── packages/ │ │ │ │ │ └── a/ │ │ │ │ │ ├── package.json │ │ │ │ │ └── test.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── invalid-duplicate-configs/ │ │ │ │ ├── vitest.config.one.js │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.config.two.js │ │ │ ├── invalid-duplicate-inline/ │ │ │ │ └── vitest.config.ts │ │ │ ├── invalid-non-existing-config/ │ │ │ │ └── vitest.config.ts │ │ │ ├── negated/ │ │ │ │ ├── packages/ │ │ │ │ │ ├── a/ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test.test.ts │ │ │ │ │ ├── b/ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test.test.ts │ │ │ │ │ └── c/ │ │ │ │ │ ├── package.json │ │ │ │ │ └── test.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── project-1/ │ │ │ │ └── calculator-1.test.ts │ │ │ ├── project-2/ │ │ │ │ └── calculator-2.test.ts │ │ │ ├── several-configs/ │ │ │ │ ├── test/ │ │ │ │ │ ├── 1_test.test.ts │ │ │ │ │ ├── 2_test.test.ts │ │ │ │ │ ├── vitest.config.one.ts │ │ │ │ │ └── vitest.config.two.ts │ │ │ │ └── vitest.config.ts │ │ │ └── several-folders/ │ │ │ ├── apps/ │ │ │ │ └── b/ │ │ │ │ ├── package.json │ │ │ │ └── test.test.ts │ │ │ ├── projects/ │ │ │ │ └── a/ │ │ │ │ ├── package.json │ │ │ │ └── test.test.ts │ │ │ └── vitest.config.ts │ │ ├── package.json │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── benchmarking.test.ts.snap │ │ │ │ ├── fails.test.ts.snap │ │ │ │ ├── list.test.ts.snap │ │ │ │ ├── no-module-runner.test.ts.snap │ │ │ │ └── stacktraces.test.ts.snap │ │ │ ├── annotations.test.ts │ │ │ ├── around-each.test.ts │ │ │ ├── artifacts.test.ts │ │ │ ├── assertion-helper.test.ts │ │ │ ├── bail-race.test.ts │ │ │ ├── benchmarking.test.ts │ │ │ ├── browser-multiple.test.ts │ │ │ ├── caching.test.ts │ │ │ ├── cancel-run.test.ts │ │ │ ├── concurrent.test.ts │ │ │ ├── config/ │ │ │ │ ├── bail.test.ts │ │ │ │ ├── browser-configs.test.ts │ │ │ │ ├── passWithNoTests.test.ts │ │ │ │ ├── sequence-shuffle.test.ts │ │ │ │ └── watchTriggerPattern.test.ts │ │ │ ├── config-loader.test.ts │ │ │ ├── configureVitest.test.ts │ │ │ ├── console.test.ts │ │ │ ├── create-vitest.test.ts │ │ │ ├── custom-pool.test.ts │ │ │ ├── custom-runner.test.ts │ │ │ ├── detect-async-leaks.test.ts │ │ │ ├── dotted-files.test.ts │ │ │ ├── expect-soft.test.ts │ │ │ ├── expect-task.test.ts │ │ │ ├── fails.test.ts │ │ │ ├── fixtures/ │ │ │ │ └── reporters/ │ │ │ │ └── html/ │ │ │ │ ├── all-passing-or-skipped/ │ │ │ │ │ ├── assets/ │ │ │ │ │ │ ├── index-BUCFJtth.js │ │ │ │ │ │ └── index-DlhE0rqZ.css │ │ │ │ │ └── index.html │ │ │ │ └── fail/ │ │ │ │ ├── assets/ │ │ │ │ │ ├── index-BUCFJtth.js │ │ │ │ │ └── index-DlhE0rqZ.css │ │ │ │ └── index.html │ │ │ ├── fs-cached-check.test.ts │ │ │ ├── get-state.test.ts │ │ │ ├── git-changed.test.ts │ │ │ ├── global-setup.test.ts │ │ │ ├── group-order.test.ts │ │ │ ├── init.test.ts │ │ │ ├── inspect.test.ts │ │ │ ├── list-changed.test.ts │ │ │ ├── list.test.ts │ │ │ ├── location-filters.test.ts │ │ │ ├── mocking.test.ts │ │ │ ├── network-imports.test.ts │ │ │ ├── no-module-runner.test.ts │ │ │ ├── no-unexpected-logging.test.ts │ │ │ ├── node-builtins.test.ts │ │ │ ├── open-telemetry.test.ts │ │ │ ├── optimize-deps.test.ts │ │ │ ├── oxc.test.ts │ │ │ ├── path-filter.test.ts │ │ │ ├── plugin.test.ts │ │ │ ├── print-error.test.ts │ │ │ ├── projects.test.ts │ │ │ ├── public-api.test.ts │ │ │ ├── public-mocker.test.ts │ │ │ ├── reported-tasks.test.ts │ │ │ ├── reporters/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ ├── default.test.ts.snap │ │ │ │ │ ├── html.test.ts.snap │ │ │ │ │ ├── json.test.ts.snap │ │ │ │ │ ├── junit.test.ts.snap │ │ │ │ │ ├── reporters.spec.ts.snap │ │ │ │ │ └── reporters.test.ts.snap │ │ │ │ ├── agent.test.ts │ │ │ │ ├── code-frame-line-limit.test.ts │ │ │ │ ├── configuration-options.test-d.ts │ │ │ │ ├── console.test.ts │ │ │ │ ├── custom-diff-config.test.ts │ │ │ │ ├── custom-reporter.test.ts │ │ │ │ ├── default.test.ts │ │ │ │ ├── dot.test.ts │ │ │ │ ├── error-to-json.test.ts │ │ │ │ ├── function-as-name.test.ts │ │ │ │ ├── github-actions.test.ts │ │ │ │ ├── html.test.ts │ │ │ │ ├── import-durations.test.ts │ │ │ │ ├── indicator-position.test.ts │ │ │ │ ├── json.test.ts │ │ │ │ ├── junit.test.ts │ │ │ │ ├── logger.test.ts │ │ │ │ ├── merge-reports.test.ts │ │ │ │ ├── reporter-error.test.ts │ │ │ │ ├── reporters.test.ts │ │ │ │ ├── silent.test.ts │ │ │ │ ├── tap.test.ts │ │ │ │ ├── test-run.test.ts │ │ │ │ ├── tree.test.ts │ │ │ │ ├── utils.ts │ │ │ │ └── verbose.test.ts │ │ │ ├── restricted-fs.test.ts │ │ │ ├── retry-clear-mocks.test.ts │ │ │ ├── rollup-error.test.ts │ │ │ ├── run-custom-env.test.ts │ │ │ ├── scoped-fixtures.test.ts │ │ │ ├── server-url.test.ts │ │ │ ├── setup-files.test.ts │ │ │ ├── shared-env.test.ts │ │ │ ├── signal.test.ts │ │ │ ├── skip-note.test.ts │ │ │ ├── ssr-runner.test.ts │ │ │ ├── stacktraces.test.ts │ │ │ ├── standalone.test.ts │ │ │ ├── static-collect.test.ts │ │ │ ├── test-meta.test.ts │ │ │ ├── test-specifications.test.ts │ │ │ ├── test-tags.test.ts │ │ │ ├── tty.test.ts │ │ │ ├── unhandled-ignore.test.ts │ │ │ ├── unhandled-rejections.test.ts │ │ │ ├── vm-threads.test.ts │ │ │ ├── watch/ │ │ │ │ ├── change-project.test.ts │ │ │ │ ├── config-watching.test.ts │ │ │ │ ├── file-watching.test.ts │ │ │ │ ├── global-setup-rerun.test.ts │ │ │ │ ├── related.test.ts │ │ │ │ ├── reporter-failed.test.ts │ │ │ │ ├── stdin.test.ts │ │ │ │ ├── stdout.test.ts │ │ │ │ └── workspaces.test.ts │ │ │ ├── windows-drive-case.test.ts │ │ │ └── workers-option.test.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ ├── config/ │ │ ├── deps/ │ │ │ ├── optimizer/ │ │ │ │ ├── external/ │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ └── optimized/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── test-dep-conditions/ │ │ │ │ ├── false.js │ │ │ │ ├── indirect.js │ │ │ │ ├── inline.js │ │ │ │ ├── package.json │ │ │ │ └── true.js │ │ │ ├── test-dep-conditions-indirect/ │ │ │ │ ├── false.js │ │ │ │ ├── package.json │ │ │ │ └── true.js │ │ │ ├── test-dep-config/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── test-dep-virtual/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ └── vite-ssr-resolve/ │ │ │ ├── inline-dep/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── other-dep/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ └── ssr-no-external-dep/ │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── fixtures/ │ │ │ ├── allowed-exec-args-fixtures/ │ │ │ │ ├── allowed-exec-argv.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── browser-no-config/ │ │ │ │ └── vitest.config.ts │ │ │ ├── browser-persistent-context/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── cache/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── second.test.ts │ │ │ ├── chai-config/ │ │ │ │ ├── test-each-title.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── conditions/ │ │ │ │ ├── basic.test.js │ │ │ │ └── vite.config.ts │ │ │ ├── conditions-pkg/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── conditions-projects/ │ │ │ │ ├── project-a/ │ │ │ │ │ ├── basic.test.js │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── project-b/ │ │ │ │ │ ├── basic.test.js │ │ │ │ │ └── vitest.config.ts │ │ │ │ └── vite.config.ts │ │ │ ├── conditions-subpackage/ │ │ │ │ ├── custom.js │ │ │ │ ├── default.js │ │ │ │ ├── development.js │ │ │ │ ├── package.json │ │ │ │ └── production.js │ │ │ ├── conditions-test/ │ │ │ │ ├── conditions.test.js │ │ │ │ └── vitest.config.ts │ │ │ ├── console/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── console-batch/ │ │ │ │ └── basic.test.ts │ │ │ ├── console-color/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── coverage-test/ │ │ │ │ └── example.ts │ │ │ ├── css/ │ │ │ │ ├── App.css │ │ │ │ ├── App.module.css │ │ │ │ ├── test/ │ │ │ │ │ ├── default-css.spec.ts │ │ │ │ │ ├── non-scope-module.spec.ts │ │ │ │ │ ├── process-css.spec.ts │ │ │ │ │ ├── process-inline.spec.ts │ │ │ │ │ ├── process-module.spec.ts │ │ │ │ │ └── scope-module.spec.ts │ │ │ │ └── utils.ts │ │ │ ├── diff/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vite.config.ts │ │ │ ├── exclude/ │ │ │ │ ├── math.test.ts │ │ │ │ ├── math.ts │ │ │ │ ├── string.test.ts │ │ │ │ ├── string.ts │ │ │ │ └── vitest.exclude.config.ts │ │ │ ├── exec-args-fixtures/ │ │ │ │ ├── forks.test.ts │ │ │ │ ├── threads.test.ts │ │ │ │ └── vmThreads.test.ts │ │ │ ├── external/ │ │ │ │ └── dynamic/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── filters/ │ │ │ │ └── test/ │ │ │ │ ├── config.test.ts │ │ │ │ ├── dont-run-this.test.ts │ │ │ │ └── example.test.ts │ │ │ ├── filters-slash/ │ │ │ │ ├── test/ │ │ │ │ │ ├── basic/ │ │ │ │ │ │ └── a.test.ts │ │ │ │ │ ├── basic-foo/ │ │ │ │ │ │ └── a.test.ts │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── foo-basic/ │ │ │ │ │ └── a.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── fixture-no-async/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── hook-timeout/ │ │ │ │ └── basic.test.ts │ │ │ ├── inline-setup-file/ │ │ │ │ ├── file-setup.js │ │ │ │ ├── test.test.js │ │ │ │ └── vitest.config.js │ │ │ ├── mixed-environments/ │ │ │ │ ├── project/ │ │ │ │ │ └── test/ │ │ │ │ │ ├── happy-dom.test.ts │ │ │ │ │ ├── jsdom.test.ts │ │ │ │ │ ├── node.test.ts │ │ │ │ │ └── workspace-project.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── mode/ │ │ │ │ ├── example.benchmark.ts │ │ │ │ ├── example.test.ts │ │ │ │ ├── vitest.benchmark.config.ts │ │ │ │ └── vitest.test.config.ts │ │ │ ├── no-browser-workspace/ │ │ │ │ └── vitest.config.ts │ │ │ ├── no-exec-args-fixtures/ │ │ │ │ ├── no-exec-argv.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── optimizer/ │ │ │ │ └── external/ │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── pool/ │ │ │ │ ├── a.test.ts │ │ │ │ ├── b.test.ts │ │ │ │ ├── c.test.ts │ │ │ │ ├── print-config.test.ts │ │ │ │ ├── print-testfiles.test.ts │ │ │ │ └── write-to-stdout-and-stderr.test.ts │ │ │ ├── public-config/ │ │ │ │ ├── vitest.config.ts │ │ │ │ └── vitest.custom.config.ts │ │ │ ├── retry/ │ │ │ │ ├── retry.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── run-mode/ │ │ │ │ ├── example.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── sequence-concurrent/ │ │ │ │ ├── sequence-concurrent-false-concurrent.test.ts │ │ │ │ ├── sequence-concurrent-false-sequential.test.ts │ │ │ │ ├── sequence-concurrent-true-concurrent.test.ts │ │ │ │ └── sequence-concurrent-true-sequential.test.ts │ │ │ ├── shard/ │ │ │ │ ├── test/ │ │ │ │ │ ├── 1.test.js │ │ │ │ │ ├── 2.test.js │ │ │ │ │ └── 3.test.js │ │ │ │ └── vitest.config.js │ │ │ ├── shard-4-files/ │ │ │ │ ├── test/ │ │ │ │ │ ├── 1.test.js │ │ │ │ │ ├── 2.test.js │ │ │ │ │ ├── 3.test.js │ │ │ │ │ └── 4.test.js │ │ │ │ └── vitest.config.js │ │ │ ├── snapshot-path-context/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ ├── project1/ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ └── project2/ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ ├── basic.test.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── test/ │ │ │ │ ├── example.test.ts │ │ │ │ ├── fake-timers.test.ts │ │ │ │ └── vitest.config.js │ │ │ ├── vitest.config.js │ │ │ ├── workers-option/ │ │ │ │ ├── example.test.ts │ │ │ │ └── vitest.config.js │ │ │ └── workspace-flags/ │ │ │ ├── projects/ │ │ │ │ ├── cli-config.test.ts │ │ │ │ └── vitest.config.js │ │ │ └── vitest.config.js │ │ ├── package.json │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── diff.test.ts.snap │ │ │ │ └── hook-timeout.test.ts.snap │ │ │ ├── browser-persistent-context.test.ts │ │ │ ├── cache.test.ts │ │ │ ├── chai-config.test.ts │ │ │ ├── cli-config.test.ts │ │ │ ├── conditions-cli.test.ts │ │ │ ├── config-types.test-d.ts │ │ │ ├── console-color.test.ts │ │ │ ├── console.test.ts │ │ │ ├── css-configs.test.ts │ │ │ ├── diff.test.ts │ │ │ ├── exclude.test.ts │ │ │ ├── exec-args.test.ts │ │ │ ├── external.test.ts │ │ │ ├── failures.test.ts │ │ │ ├── fixture-no-async.test.ts │ │ │ ├── hook-timeout.test.ts │ │ │ ├── inline-setup-file.test.ts │ │ │ ├── mixed-environments.test.ts │ │ │ ├── mode.test.ts │ │ │ ├── optimizer.test.ts │ │ │ ├── override.test.ts │ │ │ ├── pass-empty-files.test.ts │ │ │ ├── pool.test.ts │ │ │ ├── public.test.ts │ │ │ ├── retry.test.ts │ │ │ ├── sequence-concurrent.test.ts │ │ │ ├── shard.test.ts │ │ │ ├── snapshot.test.ts │ │ │ ├── testname-pattern.test.ts │ │ │ └── vite-ssr-resolve.test.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ ├── core/ │ │ ├── __mocks__/ │ │ │ ├── @vitest/ │ │ │ │ └── test-fn.ts │ │ │ ├── @vueuse/ │ │ │ │ └── integrations/ │ │ │ │ └── useJwt.ts │ │ │ ├── axios/ │ │ │ │ └── index.ts │ │ │ ├── custom-lib.ts │ │ │ ├── extension.js.ts │ │ │ ├── fs/ │ │ │ │ └── promises.cjs │ │ │ ├── fs.cjs │ │ │ ├── timers.ts │ │ │ ├── virtual-module.ts │ │ │ └── vscode-mocks.ts │ │ ├── deps/ │ │ │ ├── dep-cjs/ │ │ │ │ ├── esm-comment.js │ │ │ │ ├── esm-string.js │ │ │ │ └── package.json │ │ │ ├── dep-esm-non-existing/ │ │ │ │ ├── index.mjs │ │ │ │ ├── index.mts │ │ │ │ └── package.json │ │ │ ├── dep-fn/ │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── dep-nested-cjs/ │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── dep1/ │ │ │ │ ├── esm/ │ │ │ │ │ └── index.js │ │ │ │ └── package.json │ │ │ └── dep2/ │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── index.html │ │ ├── package.json │ │ ├── projects/ │ │ │ ├── custom-lib/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── inline-lib/ │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── vite-environment-external/ │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ └── vite-external/ │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── submodule.ts │ │ │ ├── aliased-mod.ts │ │ │ ├── circularA.ts │ │ │ ├── circularB.ts │ │ │ ├── cjs/ │ │ │ │ ├── array-cjs.js │ │ │ │ ├── bare-cjs.js │ │ │ │ ├── class-cjs.js │ │ │ │ ├── default-function.d.ts │ │ │ │ ├── default-function.js │ │ │ │ ├── module-cjs.ts │ │ │ │ ├── nested-default-cjs.js │ │ │ │ ├── primitive-cjs.js │ │ │ │ ├── promise-export.js │ │ │ │ └── prototype-cjs.js │ │ │ ├── class-inheritence/ │ │ │ │ ├── bar.ts │ │ │ │ └── foo.ts │ │ │ ├── custom/ │ │ │ │ └── gardener.ts │ │ │ ├── dynamic-import.ts │ │ │ ├── env.ts │ │ │ ├── esm/ │ │ │ │ ├── esm.js │ │ │ │ ├── internal-esm.mjs │ │ │ │ └── package.json │ │ │ ├── exec.ts │ │ │ ├── external/ │ │ │ │ ├── default-cjs.js │ │ │ │ ├── nested-default-cjs.js │ │ │ │ ├── package.json │ │ │ │ ├── pkg-browser/ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── package.json │ │ │ │ │ ├── ssr.js │ │ │ │ │ └── web.js │ │ │ │ └── pkg-node/ │ │ │ │ ├── index.d.ts │ │ │ │ ├── package.json │ │ │ │ ├── ssr.js │ │ │ │ └── web.js │ │ │ ├── file-css.css │ │ │ ├── file-less.less │ │ │ ├── file-sass.sass │ │ │ ├── file-scss.scss │ │ │ ├── file-txt.txt │ │ │ ├── global-mock.ts │ │ │ ├── in-source/ │ │ │ │ ├── add.ts │ │ │ │ ├── fibonacci.ts │ │ │ │ └── index.ts │ │ │ ├── mockedA.ts │ │ │ ├── mockedB.ts │ │ │ ├── mockedC.ts │ │ │ ├── mockedD.ts │ │ │ ├── mockedE.ts │ │ │ ├── mocks/ │ │ │ │ ├── A.ts │ │ │ │ ├── B.ts │ │ │ │ ├── autospying-namespace/ │ │ │ │ │ ├── index.ts │ │ │ │ │ └── namespaceTarget.ts │ │ │ │ ├── cyclic-deps/ │ │ │ │ │ ├── module-1.mjs │ │ │ │ │ ├── module-2.mjs │ │ │ │ │ ├── module-3.mjs │ │ │ │ │ └── module-4.mjs │ │ │ │ ├── default.ts │ │ │ │ ├── dynamic-module.d.ts │ │ │ │ ├── dynamic-module.js │ │ │ │ ├── example.ts │ │ │ │ ├── export-default-circle-b.ts │ │ │ │ ├── export-default-circle-index.ts │ │ │ │ ├── external/ │ │ │ │ │ ├── cjs-pseudoesm.cjs │ │ │ │ │ ├── default-cjs.cjs │ │ │ │ │ ├── default-function.cjs │ │ │ │ │ └── external.mjs │ │ │ │ ├── has space in path.ts │ │ │ │ ├── integration.ts │ │ │ │ ├── log.ts │ │ │ │ ├── main.js │ │ │ │ ├── moduleA.ts │ │ │ │ ├── moduleB.ts │ │ │ │ ├── moduleWithSymbol.ts │ │ │ │ ├── retry-dynamic-import.ts │ │ │ │ ├── set-foo.ts │ │ │ │ ├── squared.js │ │ │ │ └── test-fn-magic.ts │ │ │ ├── module-esm.ts │ │ │ ├── read-hello-world.ts │ │ │ ├── relative-import.ts │ │ │ ├── rely-on-hoisted.ts │ │ │ ├── self/ │ │ │ │ ├── foo.ts │ │ │ │ └── index.ts │ │ │ ├── submodule.ts │ │ │ ├── timeout.ts │ │ │ ├── wasm/ │ │ │ │ ├── add.wasm │ │ │ │ ├── wasm-bindgen/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── index_bg.js │ │ │ │ │ ├── index_bg.wasm │ │ │ │ │ └── package.json │ │ │ │ └── wasm-bindgen-no-cyclic/ │ │ │ │ ├── README.md │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── index_bg.js │ │ │ │ ├── index_bg.wasm │ │ │ │ ├── index_bg.wasm.d.ts │ │ │ │ └── package.json │ │ │ └── web-worker/ │ │ │ ├── eventListenerWorker.ts │ │ │ ├── mock/ │ │ │ │ ├── worker-dep.ts │ │ │ │ └── worker.ts │ │ │ ├── objectWorker.ts │ │ │ ├── selfWorker.ts │ │ │ ├── selfWorkerDep.ts │ │ │ ├── sharedWorker.ts │ │ │ ├── worker-globals.ts │ │ │ └── worker.ts │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ ├── injector-mock.test.ts.snap │ │ │ │ ├── jest-expect.test.ts.snap │ │ │ │ ├── mocked.test.ts.snap │ │ │ │ ├── nested-suite.test.ts.snap │ │ │ │ ├── serialize.test.ts.snap │ │ │ │ ├── snapshot-concurrent-sync.test.ts.snap │ │ │ │ ├── snapshot-concurrent.test.ts.snap │ │ │ │ ├── snapshot.test.ts.snap │ │ │ │ ├── suite.test.tsx.snap │ │ │ │ ├── test-for-suite.test.ts.snap │ │ │ │ └── test-for.test.ts.snap │ │ │ ├── alias.test.ts │ │ │ ├── basic.test.ts │ │ │ ├── browserAutomocker.test.ts │ │ │ ├── builtin.test.ts │ │ │ ├── chai-style-assertions.test.ts │ │ │ ├── chainable.test.ts │ │ │ ├── child-specific.child_process.test.ts │ │ │ ├── circular.test.ts │ │ │ ├── cli-test.test.ts │ │ │ ├── concurrent-suite.test.ts │ │ │ ├── concurrent.spec.ts │ │ │ ├── custom.test.ts │ │ │ ├── date-mock.test.ts │ │ │ ├── define-ssr.test.ts │ │ │ ├── define-web.test.ts │ │ │ ├── diff.test.ts │ │ │ ├── do-mock-reset-modules.test.ts │ │ │ ├── do-mock.test.ts │ │ │ ├── dom-single-line-options.test.ts │ │ │ ├── dom.test.ts │ │ │ ├── dual-package-hazard.test.ts │ │ │ ├── dynamic-import.test.ts │ │ │ ├── each.test.ts │ │ │ ├── edge.test.ts │ │ │ ├── env-glob.test.ts │ │ │ ├── env-jsdom.test.ts │ │ │ ├── env-runtime.test.ts │ │ │ ├── env.test.ts │ │ │ ├── environments/ │ │ │ │ ├── custom-env.test.ts │ │ │ │ ├── happy-dom.spec.ts │ │ │ │ ├── jsdom.spec.ts │ │ │ │ └── node.spec.ts │ │ │ ├── error.test.ts │ │ │ ├── esnext-decorator.test.ts │ │ │ ├── esnext.test.ts │ │ │ ├── execution-order.test.ts │ │ │ ├── expect-circular.test.ts │ │ │ ├── expect-poll.test.ts │ │ │ ├── expect.test-d.ts │ │ │ ├── expect.test.ts │ │ │ ├── exports.test.ts │ │ │ ├── external-module-directory.test.ts │ │ │ ├── file-path.test.ts │ │ │ ├── fixture-comments-between-destructure.test.ts │ │ │ ├── fixture-concurrent-beforeEach.test.ts │ │ │ ├── fixture-concurrent.test.ts │ │ │ ├── fixture-initialization.test.ts │ │ │ ├── fixture-options.test.ts │ │ │ ├── fixtures/ │ │ │ │ ├── hello-mock.ts │ │ │ │ ├── hi.txt │ │ │ │ ├── increment-indirect.ts │ │ │ │ ├── increment.ts │ │ │ │ ├── mocked-dependency.ts │ │ │ │ ├── named-overwrite-all/ │ │ │ │ │ ├── dep1.js │ │ │ │ │ ├── dep2.js │ │ │ │ │ └── main.js │ │ │ │ ├── snapshot-empty.txt │ │ │ │ ├── snapshots/ │ │ │ │ │ ├── basic/ │ │ │ │ │ │ ├── input.json │ │ │ │ │ │ └── output.css │ │ │ │ │ └── multiple/ │ │ │ │ │ ├── input.json │ │ │ │ │ └── output.css │ │ │ │ ├── timers.suite.ts │ │ │ │ └── virtual-module-indirect.ts │ │ │ ├── fn.test.ts │ │ │ ├── fs.test.ts │ │ │ ├── handled-unhandled.test.ts │ │ │ ├── happy-dom-custom.test.ts │ │ │ ├── happy-dom.test.ts │ │ │ ├── hoist-import.test.ts │ │ │ ├── hoisted-async-simple.test.ts │ │ │ ├── hoisted-simple.test.ts │ │ │ ├── hooks-list.test.ts │ │ │ ├── hooks-parallel.test.ts │ │ │ ├── hooks-stack.test.ts │ │ │ ├── hooks.test.js │ │ │ ├── hooks.test.ts │ │ │ ├── immutable.test.ts │ │ │ ├── import-client.test.ts │ │ │ ├── import-meta-resolve.test.ts │ │ │ ├── imports.test.ts │ │ │ ├── injector-esm.test.ts │ │ │ ├── injector-mock.test.ts │ │ │ ├── inline-snap.test.ts │ │ │ ├── inlined.test.ts │ │ │ ├── isolate.test.ts │ │ │ ├── jest-expect-no-url.test.ts │ │ │ ├── jest-expect.test.ts │ │ │ ├── jest-matcher-utils.test.ts │ │ │ ├── jest-mock.test.ts │ │ │ ├── local-context.test.ts │ │ │ ├── lot-of-tests.test.ts │ │ │ ├── math.test.ts │ │ │ ├── memory-limit.test.ts │ │ │ ├── mock-fs.test.ts │ │ │ ├── mock-internals.test.ts │ │ │ ├── mocked-circular.test.ts │ │ │ ├── mocked-class-restore-all.test.ts │ │ │ ├── mocked-class-restore-explicit.test.ts │ │ │ ├── mocked-class.test.ts │ │ │ ├── mocked-import-circular.test.ts │ │ │ ├── mocked-no-mocks-same.test.ts │ │ │ ├── mocked-no-mocks.test.ts │ │ │ ├── mocked-node-module.test.ts │ │ │ ├── mocked-public-key.test.ts │ │ │ ├── mocked.test.js │ │ │ ├── mocked.test.ts │ │ │ ├── mocking/ │ │ │ │ ├── already-hoisted.test.ts │ │ │ │ ├── automocking-class-inheritence.test.ts │ │ │ │ ├── automocking.spec.ts │ │ │ │ ├── autospying.test.ts │ │ │ │ ├── axios-mocked.test.ts │ │ │ │ ├── axios-not-mocked.test.ts │ │ │ │ ├── circular-mocks.spec.ts │ │ │ │ ├── custom-module-directory.spec.ts │ │ │ │ ├── cyclic-import-actual.spec.ts │ │ │ │ ├── cyclic-import-original.spec.ts │ │ │ │ ├── destructured.test.ts │ │ │ │ ├── error-mock.spec.ts │ │ │ │ ├── external.test.ts │ │ │ │ ├── factory.test.ts │ │ │ │ ├── has-extension.spec.ts │ │ │ │ ├── hoisted.test.ts │ │ │ │ ├── integration.test.ts │ │ │ │ ├── nested-default.spec.ts │ │ │ │ ├── retry-dynamic-import.test.ts │ │ │ │ ├── self-importing.test.ts │ │ │ │ ├── spaced.spec.ts │ │ │ │ ├── tinyspy.test.ts │ │ │ │ ├── vi-fn.test-d.ts │ │ │ │ ├── vi-fn.test.ts │ │ │ │ ├── vi-mockObject.test.ts │ │ │ │ ├── vi-spyOn.test.ts │ │ │ │ └── virtual.test.ts │ │ │ ├── modes.test.ts │ │ │ ├── module-diagnostic.test.ts │ │ │ ├── module.test.ts │ │ │ ├── moved-snapshot.test.ts │ │ │ ├── moved-snapshot.test.ts.snap │ │ │ ├── named-overwrite-all.test.ts │ │ │ ├── nested-only.test.ts │ │ │ ├── nested-suite.test.ts │ │ │ ├── nested-test.test.ts │ │ │ ├── node-protocol-jsdom.spec.ts │ │ │ ├── node-protocol-node.spec.ts │ │ │ ├── on-failed.test.ts │ │ │ ├── on-finished.test.ts │ │ │ ├── only.test.ts │ │ │ ├── parse-cjs-conditions.test.ts │ │ │ ├── pattern.test.ts │ │ │ ├── propagate-options-nested-suite.test.ts │ │ │ ├── random.test.ts │ │ │ ├── repeats.test.ts │ │ │ ├── replace-matcher.test.ts │ │ │ ├── require.test.ts │ │ │ ├── resolve-file-url.test.ts │ │ │ ├── resolve-file-url~dep.js │ │ │ ├── resolve-ssr.test.ts │ │ │ ├── resolve-web.test.ts │ │ │ ├── retry-condition.test.ts │ │ │ ├── retry-delay.test.ts │ │ │ ├── retry-only.test.ts │ │ │ ├── retry.test.ts │ │ │ ├── rpc.spec.ts │ │ │ ├── run-if.test.ts │ │ │ ├── self.test.ts │ │ │ ├── sequencers.test.ts │ │ │ ├── sequential.test.ts │ │ │ ├── serialize.test.ts │ │ │ ├── setup.ts │ │ │ ├── skip-reset-state.test.ts │ │ │ ├── skip.test.ts │ │ │ ├── snapshot-1.txt │ │ │ ├── snapshot-2.txt │ │ │ ├── snapshot-async.test.ts │ │ │ ├── snapshot-concurrent-sync.test.ts │ │ │ ├── snapshot-concurrent.test.ts │ │ │ ├── snapshot-custom-serializer.test.ts │ │ │ ├── snapshot-file.test.ts │ │ │ ├── snapshot-inline-(parentheses).test.ts │ │ │ ├── snapshot-inline.test.ts │ │ │ ├── snapshot-react-18.test.jsx │ │ │ ├── snapshot-react.test.jsx │ │ │ ├── snapshot.test.ts │ │ │ ├── snapshots-outside.ts │ │ │ ├── sourcemap.test.ts │ │ │ ├── spy.test.ts │ │ │ ├── strict.test.js │ │ │ ├── stubbed-process.test.ts │ │ │ ├── stubs.test.ts │ │ │ ├── suite.test.tsx │ │ │ ├── tab-effect.spec.mjs │ │ │ ├── task-collector.test.ts │ │ │ ├── task-names.test.ts │ │ │ ├── test-extend-with-top-level-hooks.test.ts │ │ │ ├── test-extend.test.ts │ │ │ ├── test-for-suite.test.ts │ │ │ ├── test-for.test.ts │ │ │ ├── test-name-pattern.test.ts │ │ │ ├── test-options.test.ts │ │ │ ├── test-tags-filter.test.ts │ │ │ ├── threads-specific.threads.test.ts │ │ │ ├── timeout.spec.ts │ │ │ ├── timers-getMockedSystemTime.test.ts │ │ │ ├── timers-jsdom.test.ts │ │ │ ├── timers-node.test.ts │ │ │ ├── timers-queueMicrotask.test.ts │ │ │ ├── unhandled.test.ts │ │ │ ├── unmock-import.test.ts │ │ │ ├── url-ssr.test.ts │ │ │ ├── url-web.test.ts │ │ │ ├── utils-display.spec.ts │ │ │ ├── utils.spec.ts │ │ │ ├── vi.spec.ts │ │ │ ├── vi.test-d.ts │ │ │ ├── wait.test.ts │ │ │ ├── wasm.test.ts │ │ │ ├── web-worker-jsdom.test.ts │ │ │ ├── web-worker-mock.test.ts │ │ │ ├── web-worker-node.test.ts │ │ │ └── write-file-dynamic-import.test.ts │ │ ├── tsconfig.typecheck.json │ │ ├── types/ │ │ │ ├── env.d.ts │ │ │ └── vite.d.ts │ │ ├── vite.config.ts │ │ └── vitest-environment-custom/ │ │ ├── index.ts │ │ └── package.json │ ├── coverage-test/ │ │ ├── fixtures/ │ │ │ ├── configs/ │ │ │ │ ├── vitest.config.conditional.ts │ │ │ │ ├── vitest.config.configure-vitest-hook.ts │ │ │ │ ├── vitest.config.decorators.ts │ │ │ │ ├── vitest.config.multi-transform.ts │ │ │ │ ├── vitest.config.multi-transforms.ts │ │ │ │ ├── vitest.config.query-param-transform.ts │ │ │ │ ├── vitest.config.thresholds-auto-update.ts │ │ │ │ ├── vitest.config.ts │ │ │ │ ├── vitest.config.virtual-files.ts │ │ │ │ └── vitest.config.workspace.ts │ │ │ ├── custom-provider.ts │ │ │ ├── custom-reporter.cjs │ │ │ ├── setup.isolation.ts │ │ │ ├── setup.ts │ │ │ ├── src/ │ │ │ │ ├── .should-be-excluded-from-coverage/ │ │ │ │ │ └── excluded-from-coverage.ts │ │ │ │ ├── Vue/ │ │ │ │ │ ├── Counter/ │ │ │ │ │ │ ├── Counter.component.ts │ │ │ │ │ │ ├── Counter.vue │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── Defined.vue │ │ │ │ │ ├── Hello.vue │ │ │ │ │ └── vue.shim.d.ts │ │ │ │ ├── another-setup.ts │ │ │ │ ├── branch.ts │ │ │ │ ├── circularA.ts │ │ │ │ ├── circularB.ts │ │ │ │ ├── cjs-dependency.ts │ │ │ │ ├── conditional/ │ │ │ │ │ ├── ssr.ts │ │ │ │ │ └── web.ts │ │ │ │ ├── covered.custom-1 │ │ │ │ ├── decorators.ts │ │ │ │ ├── dynamic-files.ts │ │ │ │ ├── empty-lines.ts │ │ │ │ ├── even.ts │ │ │ │ ├── file-to-change.ts │ │ │ │ ├── ignore-hints.ts │ │ │ │ ├── implicit-else.ts │ │ │ │ ├── import-meta-env.ts │ │ │ │ ├── in-source.ts │ │ │ │ ├── json-data-import.ts │ │ │ │ ├── json-data.json │ │ │ │ ├── load-outside-vite.cjs │ │ │ │ ├── math.ts │ │ │ │ ├── mock-target.ts │ │ │ │ ├── multi-environment.ts │ │ │ │ ├── multi-suite.ts │ │ │ │ ├── pre-bundle/ │ │ │ │ │ ├── bundle.js │ │ │ │ │ ├── bundle.ts │ │ │ │ │ ├── first.ts │ │ │ │ │ └── second.ts │ │ │ │ ├── pre-transpiled/ │ │ │ │ │ ├── original.ts │ │ │ │ │ ├── transpiled.d.ts │ │ │ │ │ └── transpiled.js │ │ │ │ ├── query-param-transformed.ts │ │ │ │ ├── should-be-excluded-by-default.cts │ │ │ │ ├── test-that-looks-like-source-file.ts │ │ │ │ ├── tested-with-]-in-filename.ts │ │ │ │ ├── throws-error.ts │ │ │ │ ├── types-only.ts │ │ │ │ ├── uncovered.custom-1 │ │ │ │ ├── untested-file.ts │ │ │ │ ├── untested-with-]-in-filename.ts │ │ │ │ ├── virtual-files.ts │ │ │ │ ├── worker-wrapper.ts │ │ │ │ └── worker.ts │ │ │ ├── test/ │ │ │ │ ├── allow-external-fixture.test.ts │ │ │ │ ├── circular.test.ts │ │ │ │ ├── cjs-dependency.test.ts │ │ │ │ ├── clean-on-rerun-fixture.test.ts │ │ │ │ ├── custom-1-syntax.test.ts │ │ │ │ ├── error-location.test.ts │ │ │ │ ├── even.test.ts │ │ │ │ ├── file-to-change.test.ts │ │ │ │ ├── ignore-hints-fixture.test.ts │ │ │ │ ├── import-attributes-fixture.test.ts │ │ │ │ ├── isolation-1-fixture.test.ts │ │ │ │ ├── isolation-2-fixture.test.ts │ │ │ │ ├── math.test.ts │ │ │ │ ├── merge-fixture-1.test.ts │ │ │ │ ├── merge-fixture-2.test.ts │ │ │ │ ├── merge-fixture-3.test.ts │ │ │ │ ├── mock-autospy-fixture.test.ts │ │ │ │ ├── mock-importActual-fixture.test.ts │ │ │ │ ├── mocking-in-js-file.test.js │ │ │ │ ├── multi-environment-fixture-ssr.test.ts │ │ │ │ ├── multi-environment-fixture-web.test.ts │ │ │ │ ├── multi-suite-fixture.test.ts │ │ │ │ ├── pre-transpiled-fixture.test.ts │ │ │ │ ├── query-param.test.ts │ │ │ │ ├── sources-with-]-in-filenames.test.ts │ │ │ │ ├── virtual-files-fixture.test.ts │ │ │ │ ├── vue-fixture.test.ts │ │ │ │ └── web-worker.test.ts │ │ │ └── workspaces/ │ │ │ ├── custom-2/ │ │ │ │ ├── src/ │ │ │ │ │ ├── covered.custom-2 │ │ │ │ │ └── uncovered.custom-2 │ │ │ │ └── test/ │ │ │ │ └── custom-2-syntax.test.ts │ │ │ └── project/ │ │ │ ├── project1/ │ │ │ │ ├── src/ │ │ │ │ │ ├── id.ts │ │ │ │ │ └── untested.ts │ │ │ │ └── test/ │ │ │ │ └── id.test.ts │ │ │ ├── project2/ │ │ │ │ ├── src/ │ │ │ │ │ ├── konst.ts │ │ │ │ │ └── untested.ts │ │ │ │ └── test/ │ │ │ │ └── konst.test.ts │ │ │ └── shared/ │ │ │ ├── src/ │ │ │ │ └── utils.ts │ │ │ └── test/ │ │ │ └── utils.test.ts │ │ ├── package.json │ │ ├── setup.native.ts │ │ ├── setup.ts │ │ ├── test/ │ │ │ ├── allow-external.test.ts │ │ │ ├── bundled-sources.test.ts │ │ │ ├── changed.test.ts │ │ │ ├── cjs-dependency.test.ts │ │ │ ├── clean-on-rerun.test.ts │ │ │ ├── configuration-options.test-d.ts │ │ │ ├── custom-provider.custom.test.ts │ │ │ ├── custom-reporter.test.ts │ │ │ ├── decorators.test.ts │ │ │ ├── dynamic-files.test.ts │ │ │ ├── empty-coverage-directory.test.ts │ │ │ ├── exclude-after-remap.test.ts │ │ │ ├── file-outside-vite.test.ts │ │ │ ├── ignore-hints.test.ts │ │ │ ├── implicit-else.istanbul.test.ts │ │ │ ├── import-attributes.test.ts │ │ │ ├── import-meta-env.test.ts │ │ │ ├── in-source.test.ts │ │ │ ├── include-exclude.test.ts │ │ │ ├── isolation.test.ts │ │ │ ├── merge-reports.test.ts │ │ │ ├── mixed-versions-warning.unit.test.ts │ │ │ ├── mock-autospy.test.ts │ │ │ ├── mock-importActual.test.ts │ │ │ ├── mocking-in-js-file.test.ts │ │ │ ├── multi-environment.test.ts │ │ │ ├── multi-suite.test.ts │ │ │ ├── on-failure.test.ts │ │ │ ├── pre-transpiled-source.test.ts │ │ │ ├── query-param-transforms.test.ts │ │ │ ├── reporters.test.ts │ │ │ ├── results-snapshot.test.ts │ │ │ ├── run-dynamic-coverage.test.ts │ │ │ ├── setup-files.test.ts │ │ │ ├── shard.test.ts │ │ │ ├── source-maps.test.ts │ │ │ ├── temporary-files.test.ts │ │ │ ├── test-reporter-conflicts.test.ts │ │ │ ├── threshold-100.test.ts │ │ │ ├── threshold-auto-update.test.ts │ │ │ ├── threshold-auto-update.unit.test.ts │ │ │ ├── threshold-failure.test.ts │ │ │ ├── threshold-glob.test.ts │ │ │ ├── transform-plugin-order.istanbul.test.ts │ │ │ ├── virtual-files.test.ts │ │ │ ├── vue.test.ts │ │ │ ├── web-worker.test.ts │ │ │ ├── workspace.multi-transform.test.ts │ │ │ └── workspace.project-filter.test.ts │ │ ├── tsconfig.json │ │ ├── utils.ts │ │ └── vitest.config.ts │ ├── node-runner/ │ │ ├── fixtures/ │ │ │ └── globalSetup/ │ │ │ ├── basic.test.js │ │ │ └── failing.ts │ │ ├── package.json │ │ └── test/ │ │ └── cli.test.js │ ├── snapshots/ │ │ ├── README.md │ │ ├── package.json │ │ ├── test/ │ │ │ ├── ci.test.ts │ │ │ ├── compare-keys.test.ts │ │ │ ├── custom-environment.test.ts │ │ │ ├── custom-serializers.test.ts │ │ │ ├── file.test.ts │ │ │ ├── fixtures/ │ │ │ │ ├── ci/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── compare-keys/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── custom-serializers/ │ │ │ │ │ ├── custom-serializers.test.ts │ │ │ │ │ ├── serializer-1.js │ │ │ │ │ ├── serializer-2.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── custom-snapshot-environment/ │ │ │ │ │ ├── snapshot-environment.ts │ │ │ │ │ ├── test/ │ │ │ │ │ │ └── snapshots.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── file/ │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ ├── snapshot-1.txt │ │ │ │ │ └── snapshot-2.txt │ │ │ │ ├── indent/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── inline-multiple-calls/ │ │ │ │ │ ├── different.test.ts │ │ │ │ │ ├── different2.test.ts │ │ │ │ │ ├── each.test.ts │ │ │ │ │ ├── same.test.ts │ │ │ │ │ └── same2.test.ts │ │ │ │ ├── jest-image-snapshot/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── obsolete/ │ │ │ │ │ ├── src/ │ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ │ ├── test1.test.ts.snap │ │ │ │ │ │ │ └── test2.test.ts.snap │ │ │ │ │ │ ├── test1.test.ts │ │ │ │ │ │ └── test2.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── skip-test/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── repro.test.ts.snap │ │ │ │ │ ├── repro.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── skip-test-custom/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── soft/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── soft-inline/ │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── summary/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ ├── basic.test.ts │ │ │ │ │ └── vitest.config.ts │ │ │ │ ├── summary-removed/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ └── basic.test.ts │ │ │ │ ├── test-update/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ ├── retry-file.test.ts.snap │ │ │ │ │ │ └── same-title-file.test.js.snap │ │ │ │ │ ├── inline-concurrent.test.js │ │ │ │ │ ├── inline.test.js │ │ │ │ │ ├── retry-file.test.ts │ │ │ │ │ ├── retry-inline.test.ts │ │ │ │ │ ├── same-title-file.test.js │ │ │ │ │ └── same-title-inline.test.js │ │ │ │ ├── test-update-result/ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ ├── retry-file.test.ts.snap │ │ │ │ │ │ └── same-title-file.test.js.snap │ │ │ │ │ ├── inline-concurrent.test.js │ │ │ │ │ ├── inline.test.js │ │ │ │ │ ├── retry-file.test.ts │ │ │ │ │ ├── retry-inline.test.ts │ │ │ │ │ ├── same-title-file.test.js │ │ │ │ │ └── same-title-inline.test.js │ │ │ │ └── workspace/ │ │ │ │ ├── packages/ │ │ │ │ │ └── space/ │ │ │ │ │ ├── test/ │ │ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ │ │ └── basic.test.ts.snap │ │ │ │ │ │ └── basic.test.ts │ │ │ │ │ └── vite.config.ts │ │ │ │ └── vitest.config.ts │ │ │ ├── indent.test.ts │ │ │ ├── inline-multiple-calls.test.ts │ │ │ ├── jest-image-snapshot.test.ts │ │ │ ├── obsolete.test.ts │ │ │ ├── skip-test.test.ts │ │ │ ├── snapshots.test.ts │ │ │ ├── soft-inline.test.ts │ │ │ ├── soft.test.ts │ │ │ ├── summary.test.ts │ │ │ └── test-update.test.ts │ │ └── vitest.config.ts │ ├── test-utils/ │ │ ├── cli.ts │ │ ├── fixtures/ │ │ │ └── external-math.ts │ │ ├── index.ts │ │ └── package.json │ ├── tsconfig.json │ ├── typescript/ │ │ ├── failing/ │ │ │ ├── expect-error.test-d.ts │ │ │ ├── fail.test-d.ts │ │ │ ├── js-fail.test-d.js │ │ │ ├── node-types.test-d.ts │ │ │ └── only.test-d.ts │ │ ├── fixtures/ │ │ │ ├── dynamic-title/ │ │ │ │ ├── test/ │ │ │ │ │ └── dynamic-title.test-d.ts │ │ │ │ ├── tsconfig.json │ │ │ │ └── vitest.config.ts │ │ │ └── source-error/ │ │ │ ├── src/ │ │ │ │ └── not-ok.ts │ │ │ ├── test/ │ │ │ │ └── ok.test-d.ts │ │ │ ├── tsconfig.json │ │ │ └── vite.config.ts │ │ ├── package.json │ │ ├── test/ │ │ │ ├── __snapshots__/ │ │ │ │ └── runner.test.ts.snap │ │ │ ├── runner.test.ts │ │ │ ├── typecheck-error.test.ts │ │ │ ├── typechecker.test.ts │ │ │ ├── vitest.custom.config.ts │ │ │ └── vitest.empty.config.ts │ │ ├── test-d/ │ │ │ ├── expect-extend.test-d.ts │ │ │ ├── js.test-d.js │ │ │ ├── nested-suite1.test-d.ts │ │ │ ├── nested-suite2.test-d.ts │ │ │ └── test.test-d.ts │ │ ├── tsconfig.custom.json │ │ ├── tsconfig.empty.json │ │ ├── tsconfig.fails.json │ │ ├── tsconfig.json │ │ └── vitest.config.fails.ts │ ├── ui/ │ │ ├── .gitignore │ │ ├── fixtures/ │ │ │ ├── annotated.test.ts │ │ │ ├── console.test.ts │ │ │ ├── coverage.test.ts │ │ │ ├── coverage.ts │ │ │ ├── error.test.ts │ │ │ ├── example.txt │ │ │ ├── sample.test.ts │ │ │ ├── snapshot.test.ts │ │ │ └── task-name.test.ts │ │ ├── fixtures-browser/ │ │ │ └── visual-regression.test.ts │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── test/ │ │ │ ├── html-report.spec.ts │ │ │ ├── ui-security.spec.ts │ │ │ └── ui.spec.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ ├── workspaces/ │ │ ├── .gitignore │ │ ├── coverage-report-tests/ │ │ │ ├── check-coverage.test.ts │ │ │ └── vitest.config.ts │ │ ├── cwdPlugin.d.ts │ │ ├── cwdPlugin.js │ │ ├── globalTest.ts │ │ ├── package.json │ │ ├── space-multi-transform/ │ │ │ ├── src/ │ │ │ │ └── multi-transform.ts │ │ │ └── test/ │ │ │ ├── project-1.test.ts │ │ │ └── project-2.test.ts │ │ ├── space-pools/ │ │ │ ├── forks.test.ts │ │ │ ├── isolate.test.ts │ │ │ ├── no-isolate.test.ts │ │ │ └── threads.test.ts │ │ ├── space_1/ │ │ │ ├── test/ │ │ │ │ ├── env-injected.spec.ts │ │ │ │ ├── happy-dom.spec.ts │ │ │ │ └── math.spec.ts │ │ │ ├── vite.config.ts │ │ │ └── vite.config.ts.timestamp-4345324-324424.mjs │ │ ├── space_2/ │ │ │ └── test/ │ │ │ └── node.spec.ts │ │ ├── space_3/ │ │ │ ├── fake-vitest/ │ │ │ │ ├── config.js │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── global-provide.space-3-test.ts │ │ │ ├── localSetup.ts │ │ │ ├── math.space-3-test.ts │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ └── multiply.ts │ │ │ ├── vite.config.ts │ │ │ └── vitest.config.ts │ │ ├── space_shared/ │ │ │ ├── setup.jsdom.ts │ │ │ ├── setup.node.ts │ │ │ └── test.spec.ts │ │ ├── src/ │ │ │ └── math.ts │ │ ├── vitest.config.ts │ │ └── vitest.config.watch.ts │ └── workspaces-browser/ │ ├── .gitignore │ ├── globalTest.ts │ ├── package.json │ ├── space_1/ │ │ ├── test/ │ │ │ ├── math.spec.ts │ │ │ └── node.spec.ts │ │ ├── vite.config.ts │ │ └── vitest.config.ts.timestamp-4345324-324424.mjs │ ├── space_browser/ │ │ ├── test/ │ │ │ └── browser.spec.ts │ │ └── vitest.config.ts │ ├── space_browser_inline/ │ │ ├── test/ │ │ │ └── basic.test.ts │ │ └── test-alias-to.ts │ ├── src/ │ │ └── math.ts │ └── vitest.config.ts ├── tsconfig.base.json ├── tsconfig.build.json └── tsconfig.check.json
Showing preview only (667K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (7342 symbols across 866 files)
FILE: docs/.vitepress/blog.data.ts
type Post (line 3) | interface Post {
method transform (line 17) | transform(raw): Post[] {
function formatDate (line 29) | function formatDate(raw: string): Post['date'] {
FILE: docs/.vitepress/config.ts
method config (line 93) | config(md) {
FILE: docs/.vitepress/contributors.ts
type Contributor (line 3) | interface Contributor {
type CoreTeam (line 8) | interface CoreTeam extends DefaultTheme.TeamMember {
function getAvatarUrl (line 17) | function getAvatarUrl(name: string) {
function createLinks (line 21) | function createLinks(tm: CoreTeam): CoreTeam {
FILE: docs/.vitepress/scripts/cli-generator.ts
function resolveOptions (line 49) | function resolveOptions(options: CLIOptions<any>, parentName?: string) {
function resolveCommand (line 58) | function resolveCommand(name: string, config: CLIOption<any> | null): any {
FILE: docs/.vitepress/scripts/fetch-avatars.ts
function download (line 9) | async function download(url: string, fileName: string) {
function fetchAvatars (line 22) | async function fetchAvatars() {
FILE: docs/.vitepress/scripts/transformHead.ts
function transformHead (line 5) | async function transformHead({ pageData }: TransformContext): Promise<He...
FILE: docs/.vitepress/theme/index.ts
function getRedirectPath (line 26) | function getRedirectPath(url: URL) {
method enhanceApp (line 54) | enhanceApp({ app }) {
FILE: docs/pwa-assets.config.ts
method assetName (line 9) | assetName(type, size) {
FILE: examples/fastify/src/index.ts
function start (line 3) | async function start() {
FILE: examples/in-source-test/src/index.ts
function add (line 2) | function add(...args: number[]) {
FILE: examples/lit/src/my-button.ts
class MyButton (line 10) | class MyButton extends LitElement {
method render (line 32) | render() {
method _onClick (line 42) | private _onClick() {
method foo (line 47) | foo(): string {
type HTMLElementTagNameMap (line 53) | interface HTMLElementTagNameMap {
FILE: examples/opentelemetry/src/basic.ts
function sleep (line 1) | function sleep(ms: number): Promise<void> {
FILE: examples/profiling/global-setup.ts
function setup (line 3) | function setup() {
FILE: examples/profiling/src/prime-number.ts
function getPrimeNumber (line 5) | function getPrimeNumber(bitLength: number): bigint {
function randomBigInt (line 25) | function randomBigInt(bitLength: number): bigint {
function isPrimeNumber (line 35) | function isPrimeNumber(number: bigint): boolean {
function bigIntSquareRoot (line 60) | function bigIntSquareRoot(number: bigint): bigint {
FILE: examples/profiling/test/prime-number.test.ts
constant BITS (line 4) | const BITS = process.env.CI ? 8 : 62
FILE: examples/projects/packages/client/components/Link.tsx
constant STATUS (line 3) | const STATUS = {
function Link (line 8) | function Link({ page, children }: React.PropsWithChildren<{ page: string...
FILE: examples/projects/packages/server/src/index.ts
function start (line 3) | async function start() {
FILE: packages/browser-playwright/src/commands/keyboard.ts
type KeyboardState (line 6) | interface KeyboardState {
constant VALID_KEYS (line 53) | const VALID_KEYS = new Set(['Escape', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6'...
function keyboardImplementation (line 55) | async function keyboardImplementation(
function focusIframe (line 118) | function focusIframe() {
function selectAll (line 128) | function selectAll() {
FILE: packages/browser-playwright/src/commands/screenshot.ts
type ScreenshotCommandOptions (line 8) | interface ScreenshotCommandOptions extends Omit<ScreenshotOptions, 'elem...
function takeScreenshot (line 20) | async function takeScreenshot(
FILE: packages/browser-playwright/src/commands/trace.ts
function parseLocation (line 130) | function parseLocation(context: BrowserCommandContext, stack?: string): ...
function resolveTracesPath (line 138) | function resolveTracesPath({ testPath, project }: BrowserCommandContext,...
function isPlaywrightProvider (line 210) | function isPlaywrightProvider(provider: BrowserProvider): provider is Pl...
FILE: packages/browser-playwright/src/commands/utils.ts
type UserEventCommand (line 5) | type UserEventCommand<T extends (...args: any) => any> = BrowserCommand<
type ConvertElementToLocator (line 9) | type ConvertElementToLocator<T> = T extends Element | Locator ? string : T
type ConvertUserEventParameters (line 10) | type ConvertUserEventParameters<T extends unknown[]> = {
function defineBrowserCommand (line 14) | function defineBrowserCommand<T extends unknown[]>(
function getDescribedLocator (line 24) | function getDescribedLocator(
FILE: packages/browser-playwright/src/commands/wheel.ts
type WheelCommand (line 5) | type WheelCommand = (element: Locator | Element, options: UserEventWheel...
FILE: packages/browser-playwright/src/locators.ts
class PlaywrightLocator (line 26) | class PlaywrightLocator extends Locator {
method constructor (line 27) | constructor(public selector: string, protected _container?: Element) {
method click (line 31) | public override click(options?: UserEventClickOptions) {
method dblClick (line 35) | public override dblClick(options?: UserEventClickOptions): Promise<voi...
method tripleClick (line 39) | public override tripleClick(options?: UserEventClickOptions): Promise<...
method selectOptions (line 43) | public override selectOptions(
method clear (line 50) | public override clear(options?: UserEventClearOptions): Promise<void> {
method hover (line 54) | public override hover(options?: UserEventHoverOptions): Promise<void> {
method upload (line 58) | public override upload(
method fill (line 65) | public override fill(text: string, options?: UserEventFillOptions): Pr...
method dropTo (line 69) | public override dropTo(target: Locator, options?: UserEventDragAndDrop...
method locator (line 75) | protected locator(selector: string) {
method elementLocator (line 79) | protected elementLocator(element: Element) {
method getByLabelText (line 88) | getByLabelText(text, options) {
method getByRole (line 91) | getByRole(role, options) {
method getByTestId (line 94) | getByTestId(testId) {
method getByAltText (line 97) | getByAltText(text, options) {
method getByPlaceholder (line 100) | getByPlaceholder(text, options) {
method getByText (line 103) | getByText(text, options) {
method getByTitle (line 106) | getByTitle(title, options) {
method elementLocator (line 110) | elementLocator(element: Element) {
method frameLocator (line 116) | frameLocator(locator: Locator) {
function processDragAndDropOptions (line 125) | function processDragAndDropOptions(options?: UserEventDragAndDropOptions) {
function processHoverOptions (line 138) | function processHoverOptions(options?: UserEventHoverOptions) {
function processClickOptions (line 148) | function processClickOptions(options?: UserEventClickOptions) {
function processPlaywrightPosition (line 158) | function processPlaywrightPosition(position: { x: number; y: number }) {
FILE: packages/browser-playwright/src/playwright.ts
type PlaywrightBrowser (line 42) | type PlaywrightBrowser = (typeof playwrightBrowsers)[number]
type PlaywrightProviderOptions (line 48) | interface PlaywrightProviderOptions {
function playwright (line 94) | function playwright(options: PlaywrightProviderOptions = {}): BrowserPro...
class PlaywrightBrowserProvider (line 105) | class PlaywrightBrowserProvider implements BrowserProvider {
method constructor (line 127) | constructor(
method openBrowser (line 156) | private async openBrowser(openBrowserOptions: { parallel: boolean }) {
method createMocker (line 262) | private createMocker(): BrowserModuleMocker {
method createContext (line 398) | private async createContext(sessionId: string, openBrowserOptions: { p...
method getContextOptions (line 425) | private getContextOptions(): BrowserContextOptions {
method getPage (line 437) | public getPage(sessionId: string): Page {
method getCommandsContext (line 445) | public getCommandsContext(sessionId: string): {
method openBrowserPage (line 478) | private async openBrowserPage(sessionId: string, options: { parallel: ...
method openPage (line 510) | async openPage(sessionId: string, url: string, options: { parallel: bo...
method _throwIfClosing (line 518) | private async _throwIfClosing(disposable?: { close: () => Promise<void...
method getCDPSession (line 530) | async getCDPSession(sessionid: string): Promise<CDPSession> {
method close (line 549) | async close(): Promise<void> {
function getHeaders (line 574) | function getHeaders(config: ResolvedConfig) {
function getCodeWithSourcemap (line 585) | function getCodeWithSourcemap(
function genSourceMapUrl (line 600) | function genSourceMapUrl(map: SourceMap | string): string {
function isDirectCSSRequest (line 609) | function isDirectCSSRequest(request: string): boolean {
type BrowserCommandContext (line 614) | interface BrowserCommandContext {
type _BrowserNames (line 621) | interface _BrowserNames {
type ToMatchScreenshotOptions (line 625) | interface ToMatchScreenshotOptions
type ToMatchScreenshotComparators (line 631) | interface ToMatchScreenshotComparators
type PWHoverOptions (line 635) | type PWHoverOptions = NonNullable<Parameters<Page['hover']>[1]>
type PWClickOptions (line 636) | type PWClickOptions = NonNullable<Parameters<Page['click']>[1]>
type PWDoubleClickOptions (line 637) | type PWDoubleClickOptions = NonNullable<Parameters<Page['dblclick']>[1]>
type PWFillOptions (line 638) | type PWFillOptions = NonNullable<Parameters<Page['fill']>[2]>
type PWScreenshotOptions (line 639) | type PWScreenshotOptions = NonNullable<Parameters<Page['screenshot']>[0]>
type PWSelectOptions (line 640) | type PWSelectOptions = NonNullable<Parameters<Page['selectOption']>[2]>
type PWDragAndDropOptions (line 641) | type PWDragAndDropOptions = NonNullable<Parameters<Page['dragAndDrop']>[2]>
type PWSetInputFiles (line 642) | type PWSetInputFiles = NonNullable<Parameters<Page['setInputFiles']>[2]>
type PWCDPSession (line 644) | type PWCDPSession = Pick<PlaywrightCDPSession, 'send' | 'on' | 'off' | '...
type UserEventHoverOptions (line 649) | interface UserEventHoverOptions extends PWHoverOptions {}
type UserEventClickOptions (line 650) | interface UserEventClickOptions extends PWClickOptions {}
type UserEventDoubleClickOptions (line 651) | interface UserEventDoubleClickOptions extends PWDoubleClickOptions {}
type UserEventTripleClickOptions (line 652) | interface UserEventTripleClickOptions extends PWClickOptions {}
type UserEventFillOptions (line 653) | interface UserEventFillOptions extends PWFillOptions {}
type UserEventSelectOptions (line 654) | interface UserEventSelectOptions extends PWSelectOptions {}
type UserEventDragAndDropOptions (line 655) | interface UserEventDragAndDropOptions extends PWDragAndDropOptions {}
type UserEventUploadOptions (line 656) | interface UserEventUploadOptions extends PWSetInputFiles {}
type ScreenshotOptions (line 658) | interface ScreenshotOptions extends Omit<PWScreenshotOptions, 'mask'> {
type CDPSession (line 662) | interface CDPSession extends PWCDPSession {}
FILE: packages/browser-preview/src/locators.ts
class PreviewLocator (line 25) | class PreviewLocator extends Locator {
method constructor (line 26) | constructor(protected _pwSelector: string, protected _container?: Elem...
method selector (line 30) | override get selector() {
method click (line 38) | async click(options?: UserEventClickOptions): Promise<void> {
method dblClick (line 43) | async dblClick(options?: UserEventClickOptions): Promise<void> {
method tripleClick (line 48) | async tripleClick(options?: UserEventClickOptions): Promise<void> {
method hover (line 53) | async hover(options?: UserEventHoverOptions): Promise<void> {
method unhover (line 58) | async unhover(options?: UserEventHoverOptions): Promise<void> {
method fill (line 63) | async fill(text: string, options?: UserEventFillOptions): Promise<void> {
method upload (line 68) | async upload(file: string | string[] | File | File[], options?: UserEv...
method wheel (line 73) | async wheel(options: UserEventWheelOptions): Promise<void> {
method selectOptions (line 78) | async selectOptions(
method clear (line 86) | async clear(options?: UserEventClearOptions): Promise<void> {
method locator (line 91) | protected locator(selector: string) {
method elementLocator (line 95) | protected elementLocator(element: Element) {
method getByLabelText (line 104) | getByLabelText(text, options) {
method getByRole (line 107) | getByRole(role, options) {
method getByTestId (line 110) | getByTestId(testId) {
method getByAltText (line 113) | getByAltText(text, options) {
method getByPlaceholder (line 116) | getByPlaceholder(text, options) {
method getByText (line 119) | getByText(text, options) {
method getByTitle (line 122) | getByTitle(title, options) {
method elementLocator (line 126) | elementLocator(element: Element) {
FILE: packages/browser-preview/src/preview.ts
function preview (line 8) | function preview(): BrowserProviderOption {
class PreviewBrowserProvider (line 17) | class PreviewBrowserProvider implements BrowserProvider {
method constructor (line 29) | constructor(project: TestProject) {
method isOpen (line 42) | isOpen(): boolean {
method getCommandsContext (line 46) | getCommandsContext() {
method openPage (line 50) | async openPage(_sessionId: string, url: string): Promise<void> {
method close (line 62) | async close(): Promise<void> {}
type UserEventClickOptions (line 66) | interface UserEventClickOptions extends SelectorOptions {}
type UserEventHoverOptions (line 67) | interface UserEventHoverOptions extends SelectorOptions {}
type UserEventFillOptions (line 68) | interface UserEventFillOptions extends SelectorOptions {}
type UserEventSelectOptions (line 69) | interface UserEventSelectOptions extends SelectorOptions {}
type UserEventClearOptions (line 70) | interface UserEventClearOptions extends SelectorOptions {}
type UserEventDoubleClickOptions (line 71) | interface UserEventDoubleClickOptions extends SelectorOptions {}
type UserEventTripleClickOptions (line 72) | interface UserEventTripleClickOptions extends SelectorOptions {}
type UserEventUploadOptions (line 73) | interface UserEventUploadOptions extends SelectorOptions {}
type UserEventWheelBaseOptions (line 74) | interface UserEventWheelBaseOptions extends SelectorOptions {}
type LocatorScreenshotOptions (line 75) | interface LocatorScreenshotOptions extends SelectorOptions {}
FILE: packages/browser-webdriverio/src/commands/keyboard.ts
type KeyboardState (line 7) | interface KeyboardState {
function keyboardImplementation (line 53) | async function keyboardImplementation(
function focusIframe (line 110) | function focusIframe() {
function selectAll (line 120) | function selectAll() {
FILE: packages/browser-webdriverio/src/commands/screenshot.ts
type ScreenshotCommandOptions (line 9) | interface ScreenshotCommandOptions extends Omit<ScreenshotOptions, 'elem...
function takeScreenshot (line 22) | async function takeScreenshot(
FILE: packages/browser-webdriverio/src/commands/utils.ts
type UserEventCommand (line 4) | type UserEventCommand<T extends (...args: any) => any> = BrowserCommand<
type ConvertElementToLocator (line 8) | type ConvertElementToLocator<T> = T extends Element | Locator ? string : T
type ConvertUserEventParameters (line 9) | type ConvertUserEventParameters<T extends unknown[]> = {
FILE: packages/browser-webdriverio/src/commands/wheel.ts
type WheelCommand (line 4) | type WheelCommand = (element: Locator | Element, options: UserEventWheel...
FILE: packages/browser-webdriverio/src/locators.ts
class WebdriverIOLocator (line 29) | class WebdriverIOLocator extends Locator {
method constructor (line 30) | constructor(protected _pwSelector: string, protected _container?: Elem...
method withElement (line 35) | private withElement(element: Element, error: Error | undefined) {
method selector (line 41) | override get selector(): string {
method click (line 57) | public override click(options?: UserEventClickOptions): Promise<void> {
method dblClick (line 64) | public override dblClick(options?: UserEventClickOptions): Promise<voi...
method tripleClick (line 71) | public override tripleClick(options?: UserEventClickOptions): Promise<...
method selectOptions (line 78) | public selectOptions(
method hover (line 93) | public override hover(options?: UserEventHoverOptions): Promise<void> {
method dropTo (line 100) | public override dropTo(target: Locator, options?: UserEventDragAndDrop...
method wheel (line 106) | public override wheel(options: UserEventWheelOptions): Promise<void> {
method clear (line 113) | public override clear(options?: UserEventClearOptions): Promise<void> {
method fill (line 120) | public override fill(text: string, options?: UserEventFillOptions): Pr...
method screenshot (line 127) | public override screenshot(options?: LocatorScreenshotOptions): Promis...
method locator (line 137) | protected locator(selector: string) {
method elementLocator (line 141) | protected elementLocator(element: Element) {
class ElementWebdriverIOLocator (line 148) | class ElementWebdriverIOLocator extends Locator {
method constructor (line 151) | constructor(
method selector (line 160) | override get selector() {
method locator (line 164) | protected locator(_selector: string): Locator {
method elementLocator (line 168) | protected elementLocator(_element: Element): Locator {
method getByLabelText (line 174) | getByLabelText(text, options) {
method getByRole (line 177) | getByRole(role, options) {
method getByTestId (line 180) | getByTestId(testId) {
method getByAltText (line 183) | getByAltText(text, options) {
method getByPlaceholder (line 186) | getByPlaceholder(text, options) {
method getByText (line 189) | getByText(text, options) {
method getByTitle (line 192) | getByTitle(title, options) {
method elementLocator (line 196) | elementLocator(element: Element) {
function getWebdriverioSelectOptions (line 203) | function getWebdriverioSelectOptions(element: Element, value: string | s...
function processClickOptions (line 244) | function processClickOptions(options?: UserEventClickOptions) {
function processHoverOptions (line 261) | function processHoverOptions(options?: UserEventHoverOptions) {
function processDragAndDropOptions (line 276) | function processDragAndDropOptions(options?: UserEventDragAndDropOptions) {
function scaleCoordinate (line 297) | function scaleCoordinate(coordinate: number, cache: any) {
function getCachedScale (line 301) | function getCachedScale(cache: { scale: number | undefined }) {
FILE: packages/browser-webdriverio/src/webdriverio.ts
type WebdriverBrowser (line 26) | type WebdriverBrowser = (typeof webdriverBrowsers)[number]
type WebdriverProviderOptions (line 28) | interface WebdriverProviderOptions extends Partial<
function webdriverio (line 32) | function webdriverio(options: WebdriverProviderOptions = {}): BrowserPro...
class WebdriverBrowserProvider (line 43) | class WebdriverBrowserProvider implements BrowserProvider {
method getSupportedBrowsers (line 62) | getSupportedBrowsers(): readonly string[] {
method constructor (line 66) | constructor(
method isIframeSwitched (line 86) | isIframeSwitched(): boolean {
method switchToTestFrame (line 90) | async switchToTestFrame(): Promise<void> {
method switchToMainFrame (line 106) | async switchToMainFrame(): Promise<void> {
method setViewport (line 117) | async setViewport(options: { width: number; height: number }): Promise...
method getCommandsContext (line 136) | getCommandsContext(): {
method openBrowser (line 144) | async openBrowser(): Promise<WebdriverIO.Browser> {
method buildCapabilities (line 178) | private buildCapabilities() {
method openPage (line 237) | async openPage(sessionId: string, url: string): Promise<void> {
method _throwIfClosing (line 247) | private async _throwIfClosing(action?: string) {
method close (line 255) | async close(): Promise<void> {
method getCDPSession (line 270) | async getCDPSession(_sessionId: string): Promise<CDPSession> {
type UserEventClickOptions (line 294) | interface UserEventClickOptions extends Partial<ClickOptions>, SelectorO...
type UserEventHoverOptions (line 295) | interface UserEventHoverOptions extends MoveToOptions, SelectorOptions {}
type UserEventDragAndDropOptions (line 296) | interface UserEventDragAndDropOptions extends DragAndDropOptions {
type UserEventFillOptions (line 302) | interface UserEventFillOptions extends SelectorOptions {}
type UserEventSelectOptions (line 303) | interface UserEventSelectOptions extends SelectorOptions {}
type UserEventClearOptions (line 304) | interface UserEventClearOptions extends SelectorOptions {}
type UserEventDoubleClickOptions (line 305) | interface UserEventDoubleClickOptions extends SelectorOptions {}
type UserEventTripleClickOptions (line 306) | interface UserEventTripleClickOptions extends SelectorOptions {}
type UserEventWheelBaseOptions (line 307) | interface UserEventWheelBaseOptions extends SelectorOptions {}
type LocatorScreenshotOptions (line 308) | interface LocatorScreenshotOptions extends SelectorOptions {}
type WebdriverCDPSession (line 311) | interface WebdriverCDPSession {
type BrowserCommandContext (line 319) | interface BrowserCommandContext {
type _BrowserNames (line 323) | interface _BrowserNames {
type ToMatchScreenshotOptions (line 327) | interface ToMatchScreenshotOptions
type ToMatchScreenshotComparators (line 333) | interface ToMatchScreenshotComparators
type CDPSession (line 336) | interface CDPSession extends WebdriverCDPSession {}
FILE: packages/browser/aria-role.d.ts
type ARIAWidgetRole (line 1) | type ARIAWidgetRole =
type ARIACompositeWidgetRole (line 22) | type ARIACompositeWidgetRole =
type ARIADocumentStructureRole (line 33) | type ARIADocumentStructureRole =
type ARIALandmarkRole (line 73) | type ARIALandmarkRole =
type ARIALiveRegionRole (line 83) | type ARIALiveRegionRole = "alert" | "log" | "marquee" | "status" | "timer";
type ARIAWindowRole (line 85) | type ARIAWindowRole = "alertdialog" | "dialog";
type ARIAUncategorizedRole (line 87) | type ARIAUncategorizedRole = "code";
type ARIARole (line 89) | type ARIARole =
FILE: packages/browser/context.d.ts
type BufferEncoding (line 6) | type BufferEncoding =
type ScreenshotOptions (line 22) | interface ScreenshotOptions extends SelectorOptions {
type MarkOptions (line 44) | interface MarkOptions {
type StandardScreenshotComparators (line 52) | interface StandardScreenshotComparators {
type ScreenshotComparatorRegistry (line 148) | interface ScreenshotComparatorRegistry extends StandardScreenshotCompara...
type NonStandardScreenshotComparators (line 150) | type NonStandardScreenshotComparators = Omit<
type ScreenshotMatcherOptions (line 155) | interface ScreenshotMatcherOptions<
type UserEvent (line 189) | interface UserEvent {
type UserEventFillOptions (line 373) | interface UserEventFillOptions {}
type UserEventHoverOptions (line 374) | interface UserEventHoverOptions {}
type UserEventSelectOptions (line 375) | interface UserEventSelectOptions {}
type UserEventClickOptions (line 376) | interface UserEventClickOptions {}
type UserEventClearOptions (line 377) | interface UserEventClearOptions {}
type UserEventDoubleClickOptions (line 378) | interface UserEventDoubleClickOptions {}
type UserEventTripleClickOptions (line 379) | interface UserEventTripleClickOptions {}
type UserEventDragAndDropOptions (line 380) | interface UserEventDragAndDropOptions {}
type UserEventUploadOptions (line 381) | interface UserEventUploadOptions {}
type UserEventWheelBaseOptions (line 388) | interface UserEventWheelBaseOptions {
type UserEventWheelDeltaOptions (line 402) | interface UserEventWheelDeltaOptions extends UserEventWheelBaseOptions {
type UserEventWheelDirectionOptions (line 418) | interface UserEventWheelDirectionOptions extends UserEventWheelBaseOptio...
type UserEventWheelOptions (line 433) | type UserEventWheelOptions = UserEventWheelDeltaOptions | UserEventWheel...
type LocatorOptions (line 435) | interface LocatorOptions {
type LocatorByRoleOptions (line 447) | interface LocatorByRoleOptions extends LocatorOptions {
type LocatorScreenshotOptions (line 498) | interface LocatorScreenshotOptions extends Omit<ScreenshotOptions, 'elem...
type LocatorSelectors (line 500) | interface LocatorSelectors {
type FrameLocator (line 539) | interface FrameLocator extends LocatorSelectors {}
type SelectorOptions (line 541) | interface SelectorOptions {
type Locator (line 557) | interface Locator extends LocatorSelectors {
type UserEventTabOptions (line 746) | interface UserEventTabOptions {
type UserEventTypeOptions (line 750) | interface UserEventTypeOptions extends SelectorOptions {
type Platform (line 755) | type Platform =
type BrowserPage (line 812) | interface BrowserPage extends LocatorSelectors {
type BrowserLocators (line 871) | interface BrowserLocators {
type PrettyDOMOptions (line 904) | type PrettyDOMOptions = Omit<StringifyOptions, 'maxLength'>
FILE: packages/browser/jest-dom.d.ts
type TestingLibraryMatchers (line 6) | interface TestingLibraryMatchers<E, R> {
FILE: packages/browser/matchers.d.ts
type JestAssertion (line 6) | interface JestAssertion<T = any> extends TestingLibraryMatchers<void, T> {}
type AsymmetricMatchersContaining (line 7) | interface AsymmetricMatchersContaining extends TestingLibraryMatchers<vo...
type Promisify (line 9) | type Promisify<O> = {
type PromisifyDomAssertion (line 17) | type PromisifyDomAssertion<T> = Promisify<Assertion<T>>
type ExpectStatic (line 19) | interface ExpectStatic {
FILE: packages/browser/rollup.config.js
method resolveId (line 61) | async resolveId(id, importer) {
FILE: packages/browser/src/client/channel.ts
type IframeViewportEvent (line 5) | interface IframeViewportEvent {
type IframeViewportFailEvent (line 12) | interface IframeViewportFailEvent {
type IframeViewportDoneEvent (line 18) | interface IframeViewportDoneEvent {
type GlobalChannelTestRunCanceledEvent (line 23) | interface GlobalChannelTestRunCanceledEvent {
type IframeExecuteEvent (line 28) | interface IframeExecuteEvent {
type IframeCleanupEvent (line 36) | interface IframeCleanupEvent {
type IframePrepareEvent (line 41) | interface IframePrepareEvent {
type GlobalChannelIncomingEvent (line 48) | type GlobalChannelIncomingEvent = GlobalChannelTestRunCanceledEvent
type IframeChannelIncomingEvent (line 50) | type IframeChannelIncomingEvent
type IframeChannelOutgoingEvent (line 53) | type IframeChannelOutgoingEvent
type IframeChannelEvent (line 60) | type IframeChannelEvent
FILE: packages/browser/src/client/client.ts
constant PAGE_TYPE (line 10) | const PAGE_TYPE = getBrowserState().type
constant PORT (line 12) | const PORT: string = location.port
constant HOST (line 13) | const HOST: string = [location.hostname, PORT].filter(Boolean).join(':')
constant RPC_ID (line 14) | const RPC_ID: string
constant METHOD (line 18) | const METHOD = getBrowserState().method
constant ENTRY_URL (line 19) | const ENTRY_URL: string = `${
function onCancel (line 25) | function onCancel(callback: (reason: CancelReason) => void): void {
type VitestBrowserClient (line 29) | interface VitestBrowserClient {
type BrowserRPC (line 35) | type BrowserRPC = BirpcReturn<
function waitForOrchestrator (line 42) | function waitForOrchestrator() {
function createClient (line 61) | function createClient() {
FILE: packages/browser/src/client/orchestrator.ts
constant ID_ALL (line 12) | const ID_ALL = '__vitest_all__'
class IframeOrchestrator (line 14) | class IframeOrchestrator {
method constructor (line 23) | constructor() {
method createTesters (line 42) | public async createTesters(options: BrowserTesterOptions): Promise<voi...
method cleanupTesters (line 108) | public async cleanupTesters(): Promise<void> {
method runNonIsolatedTests (line 134) | private async runNonIsolatedTests(
method runIsolatedTestInIframe (line 173) | private async runIsolatedTestInIframe(
method dispatchIframeError (line 212) | private dispatchIframeError(error: Error) {
method prepareIframe (line 218) | private async prepareIframe(
method createWarningMessage (line 275) | private createWarningMessage(iframeId: string, location: string) {
method warnReload (line 283) | private warnReload(iframe: HTMLIFrameElement, iframeId: string) {
method getIframeHref (line 299) | private getIframeHref(iframe: HTMLIFrameElement) {
method createTestIframe (line 312) | private createTestIframe(iframeId: string) {
method onGlobalChannelEvent (line 328) | private async onGlobalChannelEvent(e: MessageEvent<GlobalChannelIncomi...
method onIframeEvent (line 338) | private async onIframeEvent(e: MessageEvent<IframeChannelIncomingEvent...
method sendEventToIframe (line 386) | private async sendEventToIframe(event: IframeChannelOutgoingEvent): Pr...
function getContainer (line 428) | async function getContainer(config: SerializedConfig): Promise<HTMLDivEl...
function generateFileId (line 443) | function generateFileId(file: string) {
function setIframeViewport (line 449) | async function setIframeViewport(
function debug (line 484) | function debug(...args: unknown[]) {
FILE: packages/browser/src/client/public/error-catcher.js
function serializeError (line 3) | function serializeError(unhandledError) {
function catchWindowErrors (line 27) | function catchWindowErrors(errorEvent, prop, cb) {
function registerUnexpectedErrors (line 61) | function registerUnexpectedErrors() {
function reportUnexpectedError (line 72) | async function reportUnexpectedError(
FILE: packages/browser/src/client/public/esm-client-injector.js
function wrapModule (line 2) | function wrapModule(moduleCallback) {
function parseRegexp (line 53) | function parseRegexp(input) {
FILE: packages/browser/src/client/tester/context.ts
function triggerCommand (line 31) | function triggerCommand<T>(command: string, args: any[], error?: Error) {
function createUserEvent (line 35) | function createUserEvent(__tl_user_event_base__?: TestingLibraryUserEven...
function createPreviewUserEvent (line 146) | function createPreviewUserEvent(userEventBase: TestingLibraryUserEvent, ...
function cdp (line 283) | function cdp(): BrowserRunnerState['cdp'] {
method viewport (line 289) | viewport(width, height) {
method screenshot (line 310) | async screenshot(options = {}) {
method mark (line 357) | mark<T>(
method getByRole (line 401) | getByRole() {
method getByLabelText (line 404) | getByLabelText() {
method getByTestId (line 407) | getByTestId() {
method getByAltText (line 410) | getByAltText() {
method getByPlaceholder (line 413) | getByPlaceholder() {
method getByText (line 416) | getByText() {
method getByTitle (line 419) | getByTitle() {
method elementLocator (line 422) | elementLocator() {
method frameLocator (line 425) | frameLocator() {
method extend (line 428) | extend(methods) {
function convertToLocator (line 436) | function convertToLocator(element: Element | Locator): Locator {
function getTaskFullName (line 443) | function getTaskFullName(task: RunnerTask): string {
method extend (line 449) | extend(methods) {
function getElementLocatorSelectors (line 473) | function getElementLocatorSelectors(element: Element): LocatorSelectors {
type PrettyDOMOptions (line 490) | type PrettyDOMOptions = Omit<StringifyOptions, 'maxLength'>
function debug (line 494) | function debug(
function prettyDOM (line 509) | function prettyDOM(
function getElementError (line 543) | function getElementError(selector: string, container: Element): Error {
function configurePrettyDOM (line 549) | function configurePrettyDOM(options: StringifyOptions) {
FILE: packages/browser/src/client/tester/dialog.ts
function showPopupWarning (line 1) | function showPopupWarning<T>(name: string, value: T, defaultValue?: T) {
function setupDialogsSpy (line 21) | function setupDialogsSpy(): void {
FILE: packages/browser/src/client/tester/expect-element.ts
function element (line 11) | function element<T extends HTMLElement | SVGElement | null | Locator>(el...
FILE: packages/browser/src/client/tester/expect/toBeChecked.ts
function toBeChecked (line 23) | function toBeChecked(
function supportedRolesSentence (line 72) | function supportedRolesSentence() {
FILE: packages/browser/src/client/tester/expect/toBeEmptyDOMElement.ts
function toBeEmptyDOMElement (line 20) | function toBeEmptyDOMElement(
function isEmptyElement (line 46) | function isEmptyElement(element: HTMLElement | SVGElement): boolean {
FILE: packages/browser/src/client/tester/expect/toBeEnabled.ts
function toBeDisabled (line 21) | function toBeDisabled(
function toBeEnabled (line 45) | function toBeEnabled(
function isElementDisabled (line 69) | function isElementDisabled(element: HTMLElement | SVGElement) {
FILE: packages/browser/src/client/tester/expect/toBeInTheDocument.ts
function toBeInTheDocument (line 20) | function toBeInTheDocument(
FILE: packages/browser/src/client/tester/expect/toBeInViewport.ts
function toBeInViewport (line 20) | function toBeInViewport(
function getViewportIntersection (line 54) | async function getViewportIntersection(element: HTMLElement | SVGElement...
FILE: packages/browser/src/client/tester/expect/toBeInvalid.ts
constant FORM_TAGS (line 20) | const FORM_TAGS = ['FORM', 'INPUT', 'SELECT', 'TEXTAREA']
function isElementHavingAriaInvalid (line 22) | function isElementHavingAriaInvalid(element: HTMLElement | SVGElement) {
function isSupportsValidityMethod (line 29) | function isSupportsValidityMethod(element: HTMLElement | SVGElement): el...
function isElementInvalid (line 33) | function isElementInvalid(element: HTMLElement | SVGElement) {
function toBeInvalid (line 43) | function toBeInvalid(
function toBeValid (line 69) | function toBeValid(
FILE: packages/browser/src/client/tester/expect/toBePartiallyChecked.ts
function toBePartiallyChecked (line 21) | function toBePartiallyChecked(
function isAriaMixed (line 65) | function isAriaMixed(element: HTMLElement | SVGElement): boolean {
FILE: packages/browser/src/client/tester/expect/toBeRequired.ts
constant FORM_TAGS (line 21) | const FORM_TAGS = ['SELECT', 'TEXTAREA']
constant ARIA_FORM_TAGS (line 23) | const ARIA_FORM_TAGS = ['INPUT', 'SELECT', 'TEXTAREA']
constant UNSUPPORTED_INPUT_TYPES (line 25) | const UNSUPPORTED_INPUT_TYPES = [
constant SUPPORTED_ARIA_ROLES (line 34) | const SUPPORTED_ARIA_ROLES = [
function isRequiredOnFormTagsExceptInput (line 45) | function isRequiredOnFormTagsExceptInput(element: HTMLElement | SVGEleme...
function isRequiredOnSupportedInput (line 49) | function isRequiredOnSupportedInput(element: HTMLElement | SVGElement) {
function isElementRequiredByARIA (line 59) | function isElementRequiredByARIA(element: HTMLElement | SVGElement) {
function toBeRequired (line 69) | function toBeRequired(
FILE: packages/browser/src/client/tester/expect/toBeVisible.ts
function toBeVisible (line 22) | function toBeVisible(
function isElementVisible (line 52) | function isElementVisible(element: HTMLElement | SVGElement): boolean {
function isElementVisibleInDetails (line 67) | function isElementVisibleInDetails(targetElement: HTMLElement) {
FILE: packages/browser/src/client/tester/expect/toContainElement.ts
function toContainElement (line 20) | function toContainElement(
FILE: packages/browser/src/client/tester/expect/toContainHTML.ts
function getNormalizedHtml (line 20) | function getNormalizedHtml(container: HTMLElement | SVGElement, htmlText...
function toContainHTML (line 26) | function toContainHTML(
FILE: packages/browser/src/client/tester/expect/toHaveAccessibleDescription.ts
function toHaveAccessibleDescription (line 21) | function toHaveAccessibleDescription(
FILE: packages/browser/src/client/tester/expect/toHaveAccessibleErrorMessage.ts
function toHaveAccessibleErrorMessage (line 21) | function toHaveAccessibleErrorMessage(
FILE: packages/browser/src/client/tester/expect/toHaveAccessibleName.ts
function toHaveAccessibleName (line 21) | function toHaveAccessibleName(
FILE: packages/browser/src/client/tester/expect/toHaveAttribute.ts
function toHaveAttribute (line 20) | function toHaveAttribute(
function printAttribute (line 66) | function printAttribute(stringify: (obj: unknown) => string, name: strin...
function getAttributeComment (line 70) | function getAttributeComment(stringify: (obj: unknown) => string, name: ...
FILE: packages/browser/src/client/tester/expect/toHaveClass.ts
function toHaveClass (line 20) | function toHaveClass(
function getExpectedClassNamesAndOptions (line 104) | function getExpectedClassNamesAndOptions(
function splitClassNames (line 124) | function splitClassNames(str: string | undefined | null): string[] {
function isSubset (line 131) | function isSubset(subset: (string | RegExp)[], superset: string[]) {
FILE: packages/browser/src/client/tester/expect/toHaveDisplayValue.ts
function toHaveDisplayValue (line 20) | function toHaveDisplayValue(
function getValues (line 72) | function getValues(tagName: string, htmlElement: HTMLElement | SVGElemen...
function getExpectedValues (line 80) | function getExpectedValues(expectedValue: string | RegExp | Array<string...
FILE: packages/browser/src/client/tester/expect/toHaveFocus.ts
function toHaveFocus (line 20) | function toHaveFocus(
FILE: packages/browser/src/client/tester/expect/toHaveFormValues.ts
function toHaveFormValues (line 21) | function toHaveFormValues(
function getMultiElementValue (line 68) | function getMultiElementValue(elements: HTMLInputElement[]) {
function getFormValue (line 93) | function getFormValue(container: HTMLFormElement | HTMLFieldSetElement, ...
function getPureName (line 108) | function getPureName(name: string) {
function getAllFormValues (line 112) | function getAllFormValues(container: HTMLFormElement | HTMLFieldSetEleme...
FILE: packages/browser/src/client/tester/expect/toHaveRole.ts
function toHaveRole (line 21) | function toHaveRole(
FILE: packages/browser/src/client/tester/expect/toHaveSelection.ts
function toHaveSelection (line 20) | function toHaveSelection(
function getSelection (line 58) | function getSelection(element: HTMLElement | SVGElement): string {
FILE: packages/browser/src/client/tester/expect/toHaveStyle.ts
function toHaveStyle (line 43) | function toHaveStyle(
function getStyleFromObjectCSS (line 89) | function getStyleFromObjectCSS(css: Record<string, unknown>): Record<str...
function computeCSSStyleDeclaration (line 118) | function computeCSSStyleDeclaration(css: string): Record<string, unknown> {
function printoutObjectStyles (line 141) | function printoutObjectStyles(styles: Record<string, unknown>): string {
function isSubset (line 148) | function isSubset(
FILE: packages/browser/src/client/tester/expect/toHaveTextContent.ts
function toHaveTextContent (line 20) | function toHaveTextContent(
FILE: packages/browser/src/client/tester/expect/toHaveValue.ts
function toHaveValue (line 20) | function toHaveValue(
FILE: packages/browser/src/client/tester/expect/toMatchScreenshot.ts
function toMatchScreenshot (line 12) | async function toMatchScreenshot(
FILE: packages/browser/src/client/tester/expect/utils.ts
function queryElementFromUserInput (line 19) | function queryElementFromUserInput(
function getElementFromUserInput (line 36) | function getElementFromUserInput(
function getNodeFromUserInput (line 62) | function getNodeFromUserInput(
function getMessage (line 86) | function getMessage(
function redent (line 107) | function redent(string: string, count: number): string {
function indentString (line 111) | function indentString(string: string, count: number) {
function minIndent (line 117) | function minIndent(string: string) {
function stripIndent (line 127) | function stripIndent(string: string) {
function display (line 139) | function display(context: MatcherState, value: unknown) {
type ToSentenceOptions (line 143) | interface ToSentenceOptions {
function toSentence (line 148) | function toSentence(
class GenericTypeError (line 157) | class GenericTypeError extends Error {
method constructor (line 158) | constructor(expectedString: string, received: unknown, matcherFn: (......
class UserInputElementTypeError (line 192) | class UserInputElementTypeError extends GenericTypeError {
method constructor (line 193) | constructor(
class UserInputNodeTypeError (line 202) | class UserInputNodeTypeError extends GenericTypeError {
method constructor (line 203) | constructor(
function getTag (line 212) | function getTag(element: Element): string {
function isInputElement (line 222) | function isInputElement(element: HTMLElement | SVGElement): element is H...
type SimpleInputValue (line 226) | type SimpleInputValue = string | number | boolean | null
function getSingleElementValue (line 228) | function getSingleElementValue(
function getSelectValue (line 246) | function getSelectValue({ multiple, options }: HTMLSelectElement) {
function getInputValue (line 259) | function getInputValue(inputElement: HTMLInputElement) {
function getAccessibleValue (line 271) | function getAccessibleValue(element: Element) {
function normalize (line 278) | function normalize(text: string): string {
function matches (line 282) | function matches(textToMatch: string, matcher: string | RegExp): boolean {
function arrayAsSetComparison (line 291) | function arrayAsSetComparison(a: unknown, b: unknown): boolean | undefin...
FILE: packages/browser/src/client/tester/locators/index.ts
function sleep (line 50) | function sleep(ms: number): Promise<void> {
method constructor (line 81) | constructor() {
method click (line 90) | public click(options?: UserEventClickOptions): Promise<void> {
method dblClick (line 94) | public dblClick(options?: UserEventClickOptions): Promise<void> {
method tripleClick (line 98) | public tripleClick(options?: UserEventClickOptions): Promise<void> {
method wheel (line 102) | public wheel(options: UserEventWheelOptions): Promise<void> {
method clear (line 123) | public clear(options?: UserEventClearOptions): Promise<void> {
method hover (line 127) | public hover(options?: UserEventHoverOptions): Promise<void> {
method unhover (line 131) | public unhover(options?: UserEventHoverOptions): Promise<void> {
method fill (line 135) | public fill(text: string, options?: UserEventFillOptions): Promise<void> {
method upload (line 139) | public upload(files: string | string[] | File | File[], options?: UserEv...
method dropTo (line 167) | public dropTo(target: Locator, options: UserEventDragAndDropOptions = {}...
method selectOptions (line 176) | public selectOptions(
method screenshot (line 195) | public screenshot(options?: LocatorScreenshotOptions): Promise<string | {
method mark (line 205) | public mark(name: string, options?: MarkOptions): Promise<void> {
method getByRole (line 224) | public getByRole(role: string, options?: LocatorByRoleOptions): Locator {
method getByAltText (line 228) | public getByAltText(text: string | RegExp, options?: LocatorOptions): Lo...
method getByLabelText (line 232) | public getByLabelText(text: string | RegExp, options?: LocatorOptions): ...
method getByPlaceholder (line 236) | public getByPlaceholder(text: string | RegExp, options?: LocatorOptions)...
method getByTestId (line 240) | public getByTestId(testId: string | RegExp): Locator {
method getByText (line 244) | public getByText(text: string | RegExp, options?: LocatorOptions): Locat...
method getByTitle (line 248) | public getByTitle(title: string | RegExp, options?: LocatorOptions): Loc...
method filter (line 252) | public filter(filter: LocatorOptions): Locator {
method and (line 280) | public and(locator: Locator): Locator {
method or (line 284) | public or(locator: Locator): Locator {
method query (line 288) | public query(): HTMLElement | SVGElement | null {
method element (line 293) | public element(): HTMLElement | SVGElement {
method elements (line 301) | public elements(): (HTMLElement | SVGElement)[] {
method length (line 306) | public get length(): number {
method all (line 310) | public all(): Locator[] {
method nth (line 314) | public nth(index: number): Locator {
method first (line 318) | public first(): Locator {
method last (line 322) | public last(): Locator {
method toString (line 326) | public toString(): string {
method toJSON (line 330) | public toJSON(): string {
method findElement (line 334) | public async findElement(options_: SelectorOptions = {}): Promise<HTMLEl...
method triggerCommand (line 364) | protected triggerCommand<T>(command: string, ...args: any[]): Promise<T> {
function triggerCommandWithTrace (line 380) | function triggerCommandWithTrace<T>(
function createStrictModeViolationError (line 394) | function createStrictModeViolationError(
FILE: packages/browser/src/client/tester/logger.ts
function setupConsoleLogSpy (line 8) | function setupConsoleLogSpy(): void {
function stdout (line 96) | function stdout(base: (...args: unknown[]) => void) {
function stderr (line 109) | function stderr(base: (...args: unknown[]) => void) {
function processLog (line 116) | function processLog(args: unknown[]) {
function sendLog (line 120) | function sendLog(
FILE: packages/browser/src/client/tester/mocker-interceptor.ts
function createModuleMockerInterceptor (line 5) | function createModuleMockerInterceptor(): ModuleMockerInterceptor {
function rpc (line 22) | function rpc(): BrowserRPC {
FILE: packages/browser/src/client/tester/mocker.ts
class VitestBrowserClientMocker (line 4) | class VitestBrowserClientMocker extends ModuleMocker {
method getMockContext (line 6) | public getMockContext() {
method wrapDynamicImport (line 10) | public override wrapDynamicImport<T>(moduleFactory: () => Promise<T>):...
FILE: packages/browser/src/client/tester/rpc.ts
function withSafeTimers (line 6) | function withSafeTimers(getTimers: typeof getSafeTimers, fn: () => void) {
function rpcDone (line 27) | async function rpcDone(): Promise<unknown[] | undefined> {
function createSafeRpc (line 35) | function createSafeRpc(
function rpc (line 61) | function rpc(): VitestBrowserClient['rpc'] {
FILE: packages/browser/src/client/tester/runner.ts
type BrowserRunnerOptions (line 35) | interface BrowserRunnerOptions {
type CoverageHandler (line 41) | interface CoverageHandler {
type BrowserVitestRunner (line 45) | interface BrowserVitestRunner extends VitestRunner {
function createBrowserRunner (line 51) | function createBrowserRunner(
function getBrowserRunner (line 320) | function getBrowserRunner(): BrowserVitestRunner | null {
function initiateRunner (line 324) | async function initiateRunner(
function getTraceMap (line 367) | async function getTraceMap(file: string, sourceMaps: Map<string, any>) {
function updateTestFilesLocations (line 378) | async function updateTestFilesLocations(files: File[], sourceMaps: Map<s...
function getTraceName (line 403) | function getTraceName(task: Task, retryCount: number, repeatsCount: numb...
FILE: packages/browser/src/client/tester/snapshot.ts
class VitestBrowserSnapshotEnvironment (line 6) | class VitestBrowserSnapshotEnvironment implements SnapshotEnvironment {
method addSourceMap (line 10) | public addSourceMap(filepath: string, map: any): void {
method getVersion (line 14) | getVersion(): string {
method getHeader (line 18) | getHeader(): string {
method readSnapshotFile (line 22) | readSnapshotFile(filepath: string): Promise<string | null> {
method saveSnapshotFile (line 26) | saveSnapshotFile(filepath: string, snapshot: string): Promise<void> {
method resolvePath (line 30) | resolvePath(filepath: string): Promise<string> {
method resolveRawPath (line 34) | resolveRawPath(testPath: string, rawPath: string): Promise<string> {
method removeSnapshotFile (line 38) | removeSnapshotFile(filepath: string): Promise<void> {
method processStackTrace (line 42) | processStackTrace(stack: ParsedStack): ParsedStack {
function rpc (line 60) | function rpc(): VitestBrowserClient['rpc'] {
FILE: packages/browser/src/client/tester/state.ts
method setup (line 30) | setup() {
function rpc (line 54) | function rpc() {
function createCdp (line 58) | function createCdp() {
function error (line 116) | function error(err: unknown) {
FILE: packages/browser/src/client/tester/tester-utils.ts
function convertElementToCssSelector (line 6) | function convertElementToCssSelector(element: Element): string {
function escapeIdForCSSSelector (line 16) | function escapeIdForCSSSelector(id: string) {
function getUniqueCssSelector (line 46) | function getUniqueCssSelector(el: Element) {
function getParent (line 90) | function getParent(el: Element) {
constant ACTION_TRACE_COMMANDS (line 98) | const ACTION_TRACE_COMMANDS = new Set([
class CommandsManager (line 115) | class CommandsManager {
method onCommand (line 118) | public onCommand(listener: (command: string, args: any[]) => void): vo...
method triggerCommand (line 122) | public async triggerCommand<T>(
function processTimeoutOptions (line 193) | function processTimeoutOptions<T extends { timeout?: number }>(options_:...
function getIframeScale (line 226) | function getIframeScale(): number {
function escapeRegexForSelector (line 239) | function escapeRegexForSelector(re: RegExp): string {
function escapeForTextSelector (line 251) | function escapeForTextSelector(text: string | RegExp, exact: boolean): s...
function convertToSelector (line 261) | async function convertToSelector(elementOrLocator: Element | Locator, op...
function isLocator (line 280) | function isLocator(element: unknown): element is Locator {
constant DEFAULT_WHEEL_DELTA (line 284) | const DEFAULT_WHEEL_DELTA = 100
function resolveUserEventWheelOptions (line 286) | function resolveUserEventWheelOptions(options: UserEventWheelOptions): U...
FILE: packages/browser/src/client/tester/tester.ts
function prepareTestEnvironment (line 116) | async function prepareTestEnvironment(options: PrepareOptions) {
function executeTests (line 181) | async function executeTests(method: 'run' | 'collect', specifications: F...
type PrepareOptions (line 221) | interface PrepareOptions {
function prepare (line 225) | async function prepare(options: PrepareOptions) {
function cleanup (line 254) | async function cleanup() {
function unhandledError (line 289) | function unhandledError(e: Error, type: string) {
function isEvent (line 296) | function isEvent(data: unknown): data is IframeChannelEvent {
FILE: packages/browser/src/client/ui.ts
function getUiAPI (line 4) | function getUiAPI(): BrowserUI | undefined {
FILE: packages/browser/src/client/utils.ts
function importId (line 7) | async function importId(id: string): Promise<any> {
function importFs (line 12) | async function importFs(id: string): Promise<any> {
function getConfig (line 28) | function getConfig(): SerializedConfig {
function ensureAwaited (line 32) | function ensureAwaited<T>(promise: (error?: Error) => Promise<T>): Promi...
type BrowserRunnerState (line 68) | interface BrowserRunnerState {
function getBrowserState (line 101) | function getBrowserState(): BrowserRunnerState {
function getWorkerState (line 107) | function getWorkerState(): WorkerGlobalState {
FILE: packages/browser/src/client/vite.config.ts
function waitFor (line 83) | async function waitFor(method: () => boolean, retries = 100): Promise<vo...
FILE: packages/browser/src/node/cdp.ts
class BrowserServerCDPHandler (line 4) | class BrowserServerCDPHandler {
method constructor (line 9) | constructor(
method send (line 14) | send(method: string, params?: Record<string, unknown>): Promise<unknow...
method on (line 18) | on(event: string, id: string, once = false): void {
method off (line 39) | off(event: string, id: string): void {
method once (line 51) | once(event: string, listener: string): void {
FILE: packages/browser/src/node/commands/fs.ts
function assertFileAccess (line 9) | function assertFileAccess(path: string, project: TestProject) {
function assertWrite (line 20) | function assertWrite(path: string, project: TestProject) {
FILE: packages/browser/src/node/commands/screenshot.ts
type ScreenshotCommandOptions (line 4) | interface ScreenshotCommandOptions extends Omit<ScreenshotOptions, 'elem...
type BrowserCommands (line 10) | interface BrowserCommands {
function returnResult (line 37) | function returnResult(
FILE: packages/browser/src/node/commands/screenshotMatcher/codecs/index.ts
function getCodec (line 5) | function getCodec(type: string) {
type AnyCodec (line 15) | type AnyCodec = typeof png
FILE: packages/browser/src/node/commands/screenshotMatcher/comparators/index.ts
function getComparator (line 14) | function getComparator<ComparatorName extends keyof ScreenshotComparator...
type AnyComparator (line 37) | type AnyComparator = Comparator<ScreenshotComparatorRegistry[keyof Scree...
FILE: packages/browser/src/node/commands/screenshotMatcher/index.ts
type DecodedImage (line 14) | type DecodedImage = Awaited<ReturnType<AnyCodec['decode']>>
type ScreenshotData (line 17) | interface ScreenshotData {
type MatchOutcome (line 34) | type MatchOutcome
function determineOutcome (line 123) | async function determineOutcome(
function performSideEffects (line 230) | async function performSideEffects(
function buildOutput (line 268) | function buildOutput(
type StableScreenshotOptions (line 346) | interface StableScreenshotOptions {
function waitForStableScreenshot (line 362) | async function waitForStableScreenshot(options: StableScreenshotOptions,...
function getStableScreenshot (line 398) | async function getStableScreenshot({
function writeScreenshot (line 455) | async function writeScreenshot(path: string, image: TypedArray) {
FILE: packages/browser/src/node/commands/screenshotMatcher/types.ts
type BaseMetadata (line 7) | interface BaseMetadata { height: number; width: number }
type TypedArray (line 8) | type TypedArray
type Promisable (line 12) | type Promisable<T> = T | Promise<T>
type Codec (line 14) | interface Codec<
type Comparator (line 32) | type Comparator<Options extends Record<string, unknown>> = (
type CustomComparatorsToRegister (line 51) | type CustomComparatorsToRegister = {
type CustomComparatorsRegistry (line 55) | type CustomComparatorsRegistry
type ToMatchScreenshotOptions (line 61) | interface ToMatchScreenshotOptions
type ToMatchScreenshotComparators (line 67) | interface ToMatchScreenshotComparators
FILE: packages/browser/src/node/commands/screenshotMatcher/utils.ts
type GlobalOptions (line 14) | type GlobalOptions = Required<Omit<
type SupportedCodecs (line 69) | type SupportedCodecs = Parameters<typeof getCodec>[0]
type ResolvedOptions (line 73) | interface ResolvedOptions {
function resolveOptions (line 87) | function resolveOptions(
function sanitize (line 198) | function sanitize(input: string, keepPaths: boolean): string {
function sanitizeArg (line 222) | function sanitizeArg(input: string): string {
function takeDecodedScreenshot (line 234) | function takeDecodedScreenshot({
function asyncTimeout (line 263) | function asyncTimeout(timeout: number): Promise<null> {
FILE: packages/browser/src/node/commands/trace.ts
type MarkTracePayload (line 3) | interface MarkTracePayload {
type GroupTracePayload (line 9) | interface GroupTracePayload {
type BrowserCommands (line 15) | interface BrowserCommands {
FILE: packages/browser/src/node/index.ts
function defineBrowserCommand (line 14) | function defineBrowserCommand<T extends unknown[]>(
method info (line 60) | info(msg, options) {
method configResolved (line 84) | configResolved(config) {
method filter (line 89) | filter(id) {
function defineBrowserProvider (line 111) | function defineBrowserProvider<T extends object = object>(options: Omit<
FILE: packages/browser/src/node/middlewares/orchestratorMiddleware.ts
function createOrchestratorMiddleware (line 6) | function createOrchestratorMiddleware(parentServer: ParentBrowserProject...
FILE: packages/browser/src/node/middlewares/testerMiddleware.ts
function createTesterMiddleware (line 6) | function createTesterMiddleware(browserServer: ParentBrowserProject): Co...
FILE: packages/browser/src/node/middlewares/utils.ts
function disableCache (line 3) | function disableCache(res: ServerResponse): void {
function allowIframes (line 11) | function allowIframes(res: ServerResponse): void {
FILE: packages/browser/src/node/plugin.ts
function isPackageExists (line 29) | function isPackageExists(pkg: string, root: string) {
method configureServer (line 39) | async configureServer(server) {
method config (line 167) | async config() {
method resolveId (line 295) | async resolveId(id) {
method resolveId (line 314) | async resolveId(rawId) {
method configureServer (line 324) | configureServer(server) {
method resolveId (line 330) | resolveId(id) {
method transform (line 335) | transform(code, id) {
method filter (line 346) | filter(id) {
method config (line 356) | async config(viteConfig) {
method handler (line 402) | handler(code, id) {
method transform (line 421) | transform(code, id, _options) {
method transformIndexHtml (line 436) | async transformIndexHtml(html, ctx) {
method config (line 545) | config() {
method handler (line 585) | handler(code) {
function tryResolve (line 597) | function tryResolve(path: string, paths: string[]) {
function getRequire (line 608) | function getRequire() {
function cleanUrl (line 616) | function cleanUrl(url: string): string {
FILE: packages/browser/src/node/plugins/pluginContext.ts
constant VIRTUAL_ID_CONTEXT (line 9) | const VIRTUAL_ID_CONTEXT = '\0vitest/browser'
constant ID_CONTEXT (line 10) | const ID_CONTEXT = 'vitest/browser'
constant DEPRECATED_ID_CONTEXT (line 12) | const DEPRECATED_ID_CONTEXT = '@vitest/browser/context'
constant DEPRECATED_VIRTUAL_ID_UTILS (line 14) | const DEPRECATED_VIRTUAL_ID_UTILS = '\0@vitest/browser/utils'
constant DEPRECATED_ID_UTILS (line 15) | const DEPRECATED_ID_UTILS = '@vitest/browser/utils'
function BrowserContext (line 19) | function BrowserContext(globalServer: ParentBrowserProject): Plugin {
function generateContextFile (line 58) | async function generateContextFile(
function getUserEventImport (line 99) | async function getUserEventImport(provider: BrowserProvider | undefined,...
FILE: packages/browser/src/node/project.ts
class ProjectBrowser (line 22) | class ProjectBrowser implements IProjectBrowser {
method constructor (line 33) | constructor(
method registerCommand (line 59) | public registerCommand<K extends keyof BrowserCommands>(
method wrapSerializedConfig (line 88) | wrapSerializedConfig(): SerializedConfig {
method initBrowserProvider (line 95) | async initBrowserProvider(project: TestProject): Promise<void> {
method parseErrorStacktrace (line 112) | public parseErrorStacktrace(
method parseStacktrace (line 119) | public parseStacktrace(
method close (line 126) | async close(): Promise<void> {
function wrapConfig (line 131) | function wrapConfig(config: SerializedConfig): SerializedConfig {
FILE: packages/browser/src/node/projectParent.ts
class ParentBrowserProject (line 24) | class ParentBrowserProject {
method constructor (line 52) | constructor(
method setServer (line 139) | public setServer(vite: Vite.ViteDevServer): void {
method spawn (line 143) | public spawn(project: TestProject): ProjectBrowser {
method parseErrorStacktrace (line 156) | public parseErrorStacktrace(
method parseStacktrace (line 166) | public parseStacktrace(
method ensureCDPHandler (line 179) | async ensureCDPHandler(sessionId: string, rpcId: string): Promise<Brow...
method removeCDPHandler (line 219) | removeCDPHandler(sessionId: string): void {
method formatScripts (line 223) | async formatScripts(scripts: BrowserScript[] | undefined): Promise<Htm...
method resolveTesterUrl (line 256) | resolveTesterUrl(pathname: string): { sessionId: string; testFile: str...
FILE: packages/browser/src/node/rpc.ts
constant BROWSER_API_PATH (line 21) | const BROWSER_API_PATH = '/__vitest_browser_api__'
function setupBrowserRpc (line 23) | function setupBrowserRpc(globalServer: ParentBrowserProject, defaultMock...
function cloneByOwnProperties (line 405) | function cloneByOwnProperties(value: any) {
function stringifyReplace (line 421) | function stringifyReplace(key: string, value: any): any {
FILE: packages/browser/src/node/serverOrchestrator.ts
function resolveOrchestrator (line 7) | async function resolveOrchestrator(
FILE: packages/browser/src/node/serverTester.ts
function resolveTester (line 9) | async function resolveTester(
FILE: packages/browser/src/node/state.ts
class BrowserServerState (line 4) | class BrowserServerState implements IBrowserServerState {
FILE: packages/browser/src/node/utils.ts
type DOM_KEY_LOCATION (line 12) | enum DOM_KEY_LOCATION {
type keyboardKey (line 19) | interface keyboardKey {
function parseKeyDef (line 32) | function parseKeyDef(text: string): {
function replacer (line 41) | function replacer(code: string, values: Record<string, string>): string {
function resolveScreenshotPath (line 45) | function resolveScreenshotPath(
function getBrowserProvider (line 67) | async function getBrowserProvider(
function slash (line 95) | function slash(path: string): string {
FILE: packages/browser/src/shared/screenshotMatcher/types.ts
type ScreenshotMatcherArguments (line 3) | type ScreenshotMatcherArguments<
type ScreenshotData (line 15) | interface ScreenshotData { path: string; width: number; height: number }
type ScreenshotMatcherOutput (line 17) | type ScreenshotMatcherOutput = Promise<
FILE: packages/browser/src/types.ts
type WebSocketBrowserHandlers (line 15) | interface WebSocketBrowserHandlers {
type Awaitable (line 62) | type Awaitable<T> = T | PromiseLike<T>
type WebSocketEvents (line 64) | interface WebSocketEvents {
type WebSocketBrowserEvents (line 73) | interface WebSocketBrowserEvents {
type WebSocketBrowserRPC (line 85) | type WebSocketBrowserRPC = BirpcReturn<
type SourceMap (line 90) | interface SourceMap {
FILE: packages/browser/utils.d.ts
type PrettyDOMOptions (line 4) | type PrettyDOMOptions = Omit<StringifyOptions, 'maxLength'>
FILE: packages/coverage-istanbul/rollup.config.js
method onLog (line 64) | onLog(level, log, handler) {
FILE: packages/coverage-istanbul/src/constants.ts
constant COVERAGE_STORE_KEY (line 1) | const COVERAGE_STORE_KEY: string = '__VITEST_COVERAGE__'
FILE: packages/coverage-istanbul/src/index.ts
method takeCoverage (line 7) | takeCoverage() {
method startCoverage (line 13) | startCoverage() {
method getProvider (line 39) | async getProvider(): Promise<IstanbulCoverageProvider> {
FILE: packages/coverage-istanbul/src/provider.ts
class IstanbulCoverageProvider (line 24) | class IstanbulCoverageProvider extends BaseCoverageProvider<ResolvedCove...
method initialize (line 31) | initialize(ctx: Vitest): void {
method requiresTransform (line 57) | requiresTransform(id: string): boolean {
method onFileTransform (line 72) | onFileTransform(sourceCode: string, id: string, pluginCtx: Vite.Rollup...
method createCoverageMap (line 124) | createCoverageMap(): libCoverage.CoverageMap {
method generateCoverage (line 128) | async generateCoverage({ allTestsRun }: ReportContext): Promise<Covera...
method generateReports (line 175) | async generateReports(coverageMap: CoverageMap, allTestsRun: boolean |...
method parseConfigModule (line 204) | async parseConfigModule(configFilePath: string): Promise<ProxifiedModu...
method getCoverageMapForUncoveredFiles (line 210) | private async getCoverageMapForUncoveredFiles(coveredFiles: string[]) {
method onEnabled (line 251) | onEnabled(): void {
method invalidateTree (line 265) | private invalidateTree(node: Vite.EnvironmentModuleNode, moduleGraph: ...
function transformCoverage (line 279) | async function transformCoverage(coverageMap: CoverageMap) {
function removeQueryParameters (line 289) | function removeQueryParameters(filename: string) {
FILE: packages/coverage-v8/src/browser.ts
type ScriptCoverage (line 10) | type ScriptCoverage = Awaited<ReturnType<typeof session.send<'Profiler.t...
method startCoverage (line 13) | async startCoverage() {
method takeCoverage (line 27) | async takeCoverage(): Promise<{ result: any[] }> {
method stopCoverage (line 44) | stopCoverage() {
method getProvider (line 48) | async getProvider(): Promise<V8CoverageProvider> {
function filterResult (line 54) | function filterResult(coverage: ScriptCoverage['result'][number]): boole...
FILE: packages/coverage-v8/src/index.ts
method startCoverage (line 14) | async startCoverage({ isolate }) {
method takeCoverage (line 26) | async takeCoverage(options): Promise<{ result: ScriptCoverageWithOffset[...
method stopCoverage (line 47) | async stopCoverage({ isolate }) {
method getProvider (line 57) | async getProvider(): Promise<V8CoverageProvider> {
function filterResult (line 63) | function filterResult(coverage: Profiler.ScriptCoverage): boolean {
FILE: packages/coverage-v8/src/load-provider.ts
function loadProvider (line 6) | async function loadProvider(): Promise<V8CoverageProvider> {
FILE: packages/coverage-v8/src/provider.ts
type ScriptCoverageWithOffset (line 21) | interface ScriptCoverageWithOffset extends Profiler.ScriptCoverage {
type RawCoverage (line 25) | interface RawCoverage { result: ScriptCoverageWithOffset[] }
constant FILE_PROTOCOL (line 27) | const FILE_PROTOCOL = 'file://'
class V8CoverageProvider (line 31) | class V8CoverageProvider extends BaseCoverageProvider<ResolvedCoverageOp...
method initialize (line 35) | initialize(ctx: Vitest): void {
method createCoverageMap (line 39) | createCoverageMap(): CoverageMap {
method generateCoverage (line 43) | async generateCoverage({ allTestsRun }: ReportContext): Promise<Covera...
method generateReports (line 103) | async generateReports(coverageMap: CoverageMap, allTestsRun?: boolean)...
method parseConfigModule (line 141) | async parseConfigModule(configFilePath: string): Promise<ProxifiedModu...
method getCoverageMapForUncoveredFiles (line 147) | private async getCoverageMapForUncoveredFiles(testedFiles: string[]): ...
method remapCoverage (line 199) | private async remapCoverage(filename: string, wrapperLength: number, r...
method getSources (line 332) | private async getSources(
method convertCoverage (line 379) | private async convertCoverage(
function findLongestFunctionLength (line 466) | function findLongestFunctionLength(functions: Profiler.FunctionCoverage[...
function removeStartsWith (line 477) | function removeStartsWith(filepath: string, start: string) {
FILE: packages/expect/rollup.config.js
function onwarn (line 52) | function onwarn(message) {
FILE: packages/expect/src/chai-style-assertions.ts
function defProperty (line 4) | function defProperty(
function defPropertyWithArgs (line 23) | function defPropertyWithArgs(
function defMethod (line 43) | function defMethod(
FILE: packages/expect/src/constants.ts
constant MATCHERS_OBJECT (line 1) | const MATCHERS_OBJECT: unique symbol = Symbol.for('matchers-object')
constant JEST_MATCHERS_OBJECT (line 2) | const JEST_MATCHERS_OBJECT: unique symbol = Symbol.for('$$jest-matchers-...
constant GLOBAL_EXPECT (line 3) | const GLOBAL_EXPECT: unique symbol = Symbol.for('expect-global')
constant ASYMMETRIC_MATCHERS_OBJECT (line 4) | const ASYMMETRIC_MATCHERS_OBJECT: unique symbol = Symbol.for(
FILE: packages/expect/src/custom-matchers.ts
method toSatisfy (line 5) | toSatisfy(actual: unknown, expected: (actual: unknown) => boolean, messa...
method toBeOneOf (line 30) | toBeOneOf(actual: unknown, expected: Array<unknown> | Set<unknown>) {
FILE: packages/expect/src/jest-asymmetric-matchers.ts
type AsymmetricMatcherInterface (line 23) | interface AsymmetricMatcherInterface {
method constructor (line 37) | constructor(protected sample: T, protected inverse = false) {}
method getMatcherContext (line 39) | protected getMatcherContext(expect?: Chai.ExpectStatic): State {
class StringContaining (line 74) | class StringContaining extends AsymmetricMatcher<string> {
method constructor (line 75) | constructor(sample: string, inverse = false) {
method asymmetricMatch (line 83) | asymmetricMatch(other: string): boolean {
method toString (line 89) | toString() {
method getExpectedType (line 93) | getExpectedType() {
class Anything (line 98) | class Anything extends AsymmetricMatcher<void> {
method asymmetricMatch (line 99) | asymmetricMatch(other: unknown): boolean {
method toString (line 103) | toString() {
method toAsymmetricMatcher (line 107) | toAsymmetricMatcher() {
class ObjectContaining (line 112) | class ObjectContaining extends AsymmetricMatcher<
method constructor (line 115) | constructor(sample: Record<string, unknown>, inverse = false) {
method getPrototype (line 119) | getPrototype(obj: object): any {
method hasProperty (line 131) | hasProperty(obj: object | null, property: string | symbol): boolean {
method getProperties (line 143) | getProperties(obj: object): (string | symbol)[] {
method asymmetricMatch (line 152) | asymmetricMatch(other: any, customTesters?: Array<Tester>): boolean {
method toString (line 185) | toString() {
method getExpectedType (line 189) | getExpectedType() {
class ArrayContaining (line 194) | class ArrayContaining<T = unknown> extends AsymmetricMatcher<Array<T>> {
method constructor (line 195) | constructor(sample: Array<T>, inverse = false) {
method asymmetricMatch (line 199) | asymmetricMatch(other: Array<T>, customTesters?: Array<Tester>): boole...
method toString (line 219) | toString() {
method getExpectedType (line 223) | getExpectedType() {
class Any (line 228) | class Any extends AsymmetricMatcher<any> {
method constructor (line 229) | constructor(sample: unknown) {
method fnNameFor (line 239) | fnNameFor(func: Function): string {
method asymmetricMatch (line 252) | asymmetricMatch(other: unknown): boolean {
method toString (line 284) | toString() {
method getExpectedType (line 288) | getExpectedType(): string {
method toAsymmetricMatcher (line 312) | toAsymmetricMatcher() {
class StringMatching (line 317) | class StringMatching extends AsymmetricMatcher<RegExp> {
method constructor (line 318) | constructor(sample: string | RegExp, inverse = false) {
method asymmetricMatch (line 326) | asymmetricMatch(other: string): boolean {
method toString (line 332) | toString() {
method getExpectedType (line 336) | getExpectedType() {
class CloseTo (line 341) | class CloseTo extends AsymmetricMatcher<number> {
method constructor (line 344) | constructor(sample: number, precision = 2, inverse = false) {
method asymmetricMatch (line 358) | asymmetricMatch(other: number) {
method toString (line 382) | toString() {
method getExpectedType (line 386) | override getExpectedType() {
method toAsymmetricMatcher (line 390) | override toAsymmetricMatcher(): string {
class SchemaMatching (line 399) | class SchemaMatching extends AsymmetricMatcher<StandardSchemaV1<unknown,...
method constructor (line 402) | constructor(sample: StandardSchemaV1<unknown, unknown>, inverse = fals...
method asymmetricMatch (line 411) | asymmetricMatch(other: unknown): boolean {
method toString (line 425) | toString() {
method getExpectedType (line 429) | getExpectedType() {
method toAsymmetricMatcher (line 433) | toAsymmetricMatcher(): string {
FILE: packages/expect/src/jest-expect.ts
class Node (line 29) | class Node {
class DOMTokenList (line 32) | class DOMTokenList {
function def (line 42) | function def(
function assertIsMock (line 530) | function assertIsMock(assertion: any) {
function getSpy (line 538) | function getSpy(assertion: any) {
function equalsArgumentArray (line 593) | function equalsArgumentArray(a: unknown[], b: unknown[]) {
function isSpyCalledBeforeAnotherSpy (line 679) | function isSpyCalledBeforeAnotherSpy(beforeSpy: MockInstance, afterSpy: ...
type ReturnMatcher (line 855) | interface ReturnMatcher<T extends any[] = []> {
function formatCalls (line 1218) | function formatCalls(spy: MockInstance, msg: string, showActualCall?: an...
function formatReturns (line 1250) | function formatReturns(
FILE: packages/expect/src/jest-extend.ts
function getMatcherState (line 22) | function getMatcherState(
class JestExtendError (line 67) | class JestExtendError extends Error {
method constructor (line 68) | constructor(message: string, public actual?: any, public expected?: an...
function JestExtendPlugin (line 73) | function JestExtendPlugin(
FILE: packages/expect/src/jest-matcher-utils.ts
constant EXPECTED_COLOR (line 12) | const EXPECTED_COLOR = c.green
constant RECEIVED_COLOR (line 13) | const RECEIVED_COLOR = c.red
constant INVERTED_COLOR (line 14) | const INVERTED_COLOR = c.inverse
constant BOLD_WEIGHT (line 15) | const BOLD_WEIGHT = c.bold
constant DIM_COLOR (line 16) | const DIM_COLOR = c.dim
function matcherHint (line 18) | function matcherHint(
constant SPACE_SYMBOL (line 85) | const SPACE_SYMBOL = '\u{00B7}' // middle dot
function replaceTrailingSpaces (line 89) | function replaceTrailingSpaces(text: string): string {
function printReceived (line 93) | function printReceived(object: unknown): string {
function printExpected (line 96) | function printExpected(value: unknown): string {
function getMatcherUtils (line 100) | function getMatcherUtils(): {
function printWithType (line 129) | function printWithType<T>(
function addCustomEqualityTesters (line 143) | function addCustomEqualityTesters(newTesters: Array<Tester>): void {
function getCustomEqualityTesters (line 157) | function getCustomEqualityTesters(): Array<Tester> {
FILE: packages/expect/src/jest-utils.ts
function equals (line 31) | function equals(
function isAsymmetric (line 43) | function isAsymmetric(obj: any): obj is AsymmetricMatcher<any> {
function hasAsymmetric (line 52) | function hasAsymmetric(obj: any, seen: Set<any> = new Set()): boolean {
function asymmetricMatch (line 72) | function asymmetricMatch(a: any, b: any, customTesters: Array<Tester>) {
function isError (line 90) | function isError(value: unknown): value is Error {
function eq (line 106) | function eq(
function isErrorEqual (line 261) | function isErrorEqual(
function keys (line 292) | function keys(obj: object, hasKey: (obj: object, key: string) => boolean) {
function hasDefinedKey (line 309) | function hasDefinedKey(obj: any, key: string) {
function hasKey (line 313) | function hasKey(obj: any, key: string) {
function isA (line 317) | function isA(typeName: string, value: unknown): boolean {
function isDomNode (line 321) | function isDomNode(obj: any): boolean {
function fnNameFor (line 334) | function fnNameFor(func: Function): string {
function getPrototype (line 345) | function getPrototype(obj: object) {
function hasProperty (line 357) | function hasProperty(obj: object | null, property: string): boolean {
constant IS_KEYED_SENTINEL (line 370) | const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'
constant IS_SET_SENTINEL (line 371) | const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'
constant IS_LIST_SENTINEL (line 372) | const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'
constant IS_ORDERED_SENTINEL (line 373) | const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'
constant IS_RECORD_SYMBOL (line 374) | const IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'
function isImmutableUnorderedKeyed (line 376) | function isImmutableUnorderedKeyed(maybeKeyed: any): boolean {
function isImmutableUnorderedSet (line 384) | function isImmutableUnorderedSet(maybeSet: any): boolean {
function isObjectLiteral (line 392) | function isObjectLiteral(source: unknown): source is Record<string, unkn...
function isImmutableList (line 396) | function isImmutableList(source: unknown): boolean {
function isImmutableOrderedKeyed (line 400) | function isImmutableOrderedKeyed(source: unknown): boolean {
function isImmutableOrderedSet (line 409) | function isImmutableOrderedSet(source: unknown): boolean {
function isImmutableRecord (line 418) | function isImmutableRecord(source: unknown): boolean {
function hasIterator (line 431) | function hasIterator(object: any) {
function iterableEquality (line 435) | function iterableEquality(
function hasPropertyInObject (line 582) | function hasPropertyInObject(object: object, key: string | symbol): bool...
function isObjectWithKeys (line 596) | function isObjectWithKeys(a: any) {
function subsetEquality (line 607) | function subsetEquality(
function typeEquality (line 653) | function typeEquality(a: any, b: any): boolean | undefined {
function arrayBufferEquality (line 661) | function arrayBufferEquality(
function sparseArrayEquality (line 697) | function sparseArrayEquality(
function generateToBeMessage (line 715) | function generateToBeMessage(
function pluralize (line 729) | function pluralize(word: string, count: number): string {
function getObjectKeys (line 733) | function getObjectKeys(object: object): Array<string | symbol> {
function getObjectSubset (line 742) | function getObjectSubset(
function isStandardSchema (line 824) | function isStandardSchema(obj: any): obj is StandardSchemaV1 {
FILE: packages/expect/src/state.ts
function getState (line 30) | function getState<State extends MatcherState = MatcherState>(
function setState (line 36) | function setState<State extends MatcherState = MatcherState>(
FILE: packages/expect/src/types.ts
type ChaiPlugin (line 15) | type ChaiPlugin = Chai.ChaiPlugin
type Tester (line 17) | type Tester = (
type TesterContext (line 24) | interface TesterContext {
type MatcherHintOptions (line 34) | interface MatcherHintOptions {
type MatcherState (line 45) | interface MatcherState {
type SyncExpectationResult (line 89) | interface SyncExpectationResult {
type AsyncExpectationResult (line 96) | type AsyncExpectationResult = Promise<SyncExpectationResult>
type ExpectationResult (line 98) | type ExpectationResult = SyncExpectationResult | AsyncExpectationResult
type RawMatcherFn (line 100) | interface RawMatcherFn<T extends MatcherState = MatcherState, E extends ...
type Matchers (line 107) | interface Matchers<T = any> {}
type MatchersObject (line 109) | type MatchersObject<T extends MatcherState = MatcherState> = Record<
type ExpectStatic (line 116) | interface ExpectStatic
type CustomMatcher (line 129) | interface CustomMatcher {
type AsymmetricMatchersContaining (line 153) | interface AsymmetricMatchersContaining extends CustomMatcher {
type WithAsymmetricMatcher (line 209) | type WithAsymmetricMatcher<T> = T | AsymmetricMatcher<unknown>
type DeeplyAllowMatchers (line 211) | type DeeplyAllowMatchers<T> = T extends Array<infer Element>
type JestAssertion (line 217) | interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomM...
type VitestAssertion (line 624) | type VitestAssertion<A, T> = {
type Promisify (line 632) | type Promisify<O> = {
type PromisifyAssertion (line 638) | type PromisifyAssertion<T> = Promisify<Assertion<T>>
type Assertion (line 640) | interface Assertion<T = any>
type ChaiMockAssertion (line 774) | interface ChaiMockAssertion {
type Matchers (line 925) | interface Matchers<R, T = {}> {}
FILE: packages/expect/src/utils.ts
function createAssertionMessage (line 6) | function createAssertionMessage(
function recordAsyncExpect (line 19) | function recordAsyncExpect(
function handleTestError (line 88) | function handleTestError(test: Test, err: unknown) {
function wrapAssertion (line 95) | function wrapAssertion(
FILE: packages/mocker/rollup.config.js
function onwarn (line 72) | function onwarn(message) {
FILE: packages/mocker/src/automocker.ts
type Key (line 1) | type Key = string | symbol
type CreateMockInstanceProcedure (line 3) | type CreateMockInstanceProcedure = (options?: {
type MockObjectOptions (line 10) | interface MockObjectOptions {
function mockObject (line 16) | function mockObject(
class RefTracker (line 183) | class RefTracker {
method getId (line 187) | public getId(value: any) {
method getMockedValue (line 191) | public getMockedValue(id: number) {
method track (line 195) | public track(originalValue: any, mockedValue: any): number {
function getType (line 203) | function getType(value: unknown): string {
function isReadonlyProp (line 207) | function isReadonlyProp(object: unknown, prop: string | symbol) {
type GlobalConstructors (line 236) | interface GlobalConstructors {
function getAllMockableProperties (line 244) | function getAllMockableProperties(
function collectOwnProperties (line 284) | function collectOwnProperties(
function collectFunctionProperties (line 296) | function collectFunctionProperties(prototype: any) {
FILE: packages/mocker/src/browser/hints.ts
type CompilerHintsOptions (line 7) | interface CompilerHintsOptions {
type ModuleMockerCompilerHints (line 22) | interface ModuleMockerCompilerHints {
function createCompilerHints (line 32) | function createCompilerHints(options?: CompilerHintsOptions): ModuleMock...
function getImporter (line 137) | function getImporter(name: string) {
FILE: packages/mocker/src/browser/interceptor-msw.ts
type ModuleMockerMSWInterceptorOptions (line 8) | interface ModuleMockerMSWInterceptorOptions {
class ModuleMockerMSWInterceptor (line 34) | class ModuleMockerMSWInterceptor implements ModuleMockerInterceptor {
method constructor (line 40) | constructor(
method register (line 48) | async register(module: MockedModule): Promise<void> {
method delete (line 53) | async delete(url: string): Promise<void> {
method invalidate (line 58) | async invalidate(): Promise<void> {
method resolveManualMock (line 62) | private async resolveManualMock(mock: ManualMockedModule) {
method init (line 72) | protected async init(): Promise<SetupWorker> {
function cleanQuery (line 125) | function cleanQuery(url: string) {
function passthrough (line 129) | function passthrough() {
function injectQuery (line 140) | function injectQuery(url: string, queryToInject: string): string {
FILE: packages/mocker/src/browser/interceptor-native.ts
class ModuleMockerServerInterceptor (line 5) | class ModuleMockerServerInterceptor implements ModuleMockerInterceptor {
method register (line 6) | async register(module: MockedModule): Promise<void> {
method delete (line 10) | async delete(id: string): Promise<void> {
method invalidate (line 14) | async invalidate(): Promise<void> {
FILE: packages/mocker/src/browser/interceptor.ts
type ModuleMockerInterceptor (line 3) | interface ModuleMockerInterceptor {
FILE: packages/mocker/src/browser/mocker.ts
class ModuleMocker (line 11) | class ModuleMocker implements TestModuleMocker {
method constructor (line 17) | constructor(
method prepare (line 24) | public async prepare(): Promise<void> {
method resolveFactoryModule (line 31) | public async resolveFactoryModule(id: string): Promise<Record<string |...
method getFactoryModule (line 40) | public getFactoryModule(id: string): any {
method invalidate (line 51) | public async invalidate(): Promise<void> {
method importActual (line 61) | public async importActual<T>(id: string, importer: string): Promise<T> {
method getBaseUrl (line 84) | protected getBaseUrl(): string {
method importMock (line 88) | public async importMock<T>(rawId: string, importer: string): Promise<T> {
method mockObject (line 132) | public mockObject(
method getMockContext (line 164) | public getMockContext(): ModuleMockContext {
method queueMock (line 170) | public queueMock(rawId: string, importer: string, factoryOrOptions?: M...
method queueUnmock (line 216) | public queueUnmock(id: string, importer: string): void {
method wrapDynamicImport (line 236) | public wrapDynamicImport<T>(moduleFactory: () => Promise<T>): Promise<...
method getMockedModuleById (line 248) | public getMockedModuleById(id: string): MockedModule | undefined {
method reset (line 252) | public reset(): void {
method resolveMockPath (line 258) | private resolveMockPath(path: string) {
function cleanVersion (line 276) | function cleanVersion(url: string) {
type ResolveIdResult (line 280) | interface ResolveIdResult {
type ResolveMockResult (line 286) | interface ResolveMockResult {
type ModuleMockerRPC (line 294) | interface ModuleMockerRPC {
type ModuleMockerConfig (line 304) | interface ModuleMockerConfig {
FILE: packages/mocker/src/browser/register.ts
function registerModuleMocker (line 11) | function registerModuleMocker(
function registerNativeFactoryResolver (line 42) | function registerNativeFactoryResolver(mocker: ModuleMocker): void {
FILE: packages/mocker/src/browser/utils.ts
function warn (line 9) | function warn() {
function rpc (line 15) | function rpc<T>(event: string, data?: any): Promise<T> {
FILE: packages/mocker/src/node/automock.ts
type AutomockOptions (line 8) | interface AutomockOptions {
function automockModule (line 17) | function automockModule(
FILE: packages/mocker/src/node/automockPlugin.ts
function automockPlugin (line 8) | function automockPlugin(options: AutomockOptions = {}): Plugin {
FILE: packages/mocker/src/node/dynamicImportPlugin.ts
type DynamicImportPluginOptions (line 9) | interface DynamicImportPluginOptions {
function dynamicImportPlugin (line 17) | function dynamicImportPlugin(options: DynamicImportPluginOptions = {}): ...
type DynamicImportInjectorResult (line 34) | interface DynamicImportInjectorResult {
function injectDynamicImport (line 39) | function injectDynamicImport(
FILE: packages/mocker/src/node/esmWalker.ts
type Positioned (line 18) | type Positioned<T> = T & {
type Node (line 23) | type Node = Positioned<_Node>
type IdentifierInfo (line 25) | interface IdentifierInfo {
type Visitors (line 41) | interface Visitors {
function setIsNodeInPattern (line 53) | function setIsNodeInPattern(node: Property): WeakSet<_Node> {
function isNodeInPattern (line 56) | function isNodeInPattern(node: _Node): node is Property {
function esmWalker (line 64) | function esmWalker(
function isRefIdentifier (line 286) | function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _No...
function isStaticProperty (line 353) | function isStaticProperty(node: _Node): node is Property {
function isStaticPropertyKey (line 357) | function isStaticPropertyKey(node: _Node, parent: _Node): boolean {
function isFunctionNode (line 362) | function isFunctionNode(node: _Node): node is FunctionNode {
function isBlock (line 367) | function isBlock(node: _Node) {
function findParentScope (line 371) | function findParentScope(
function isInDestructuringAssignment (line 378) | function isInDestructuringAssignment(
function getArbitraryModuleIdentifier (line 392) | function getArbitraryModuleIdentifier(node: Identifier | Literal): string {
FILE: packages/mocker/src/node/hoistMocks.ts
type HoistMocksOptions (line 16) | interface HoistMocksOptions {
constant API_NOT_FOUND_ERROR (line 44) | const API_NOT_FOUND_ERROR = `There are some problems in resolving the mo...
function API_NOT_FOUND_CHECK (line 50) | function API_NOT_FOUND_CHECK(names: string[]) {
function isIdentifier (line 55) | function isIdentifier(node: any): node is Positioned<Identifier> {
function getNodeTail (line 59) | function getNodeTail(code: string, node: Node) {
function hoistMocks (line 78) | function hoistMocks(
type CodeFrameGenerator (line 555) | interface CodeFrameGenerator {
FILE: packages/mocker/src/node/hoistMocksPlugin.ts
type HoistMocksPluginOptions (line 8) | interface HoistMocksPluginOptions extends Omit<HoistMocksOptions, 'regex...
function hoistMocksPlugin (line 17) | function hoistMocksPlugin(options: HoistMocksPluginOptions = {}): Plugin {
function hoistMockAndResolve (line 63) | function hoistMockAndResolve(
type HoistMocksResult (line 78) | interface HoistMocksResult {
FILE: packages/mocker/src/node/interceptorPlugin.ts
type InterceptorPluginOptions (line 9) | interface InterceptorPluginOptions {
function interceptorPlugin (line 17) | function interceptorPlugin(options: InterceptorPluginOptions = {}): Plug...
FILE: packages/mocker/src/node/mockerPlugin.ts
type MockerPluginOptions (line 14) | interface MockerPluginOptions extends AutomockPluginOptions {
function mockerPlugin (line 21) | function mockerPlugin(options: MockerPluginOptions = {}): Plugin[] {
FILE: packages/mocker/src/node/parsers.ts
function initSyntaxLexers (line 9) | async function initSyntaxLexers(): Promise<void> {
function transformCode (line 19) | function transformCode(code: string, filename: string): string {
function collectModuleExports (line 33) | function collectModuleExports(
function resolveModuleFormat (line 126) | function resolveModuleFormat(url: string, code: string): 'module' | 'com...
function getBuiltinModule (line 163) | function getBuiltinModule(moduleId: string) {
constant ESM_RE (line 168) | const ESM_RE
function hasESM (line 171) | function hasESM(code: string) {
FILE: packages/mocker/src/node/redirect.ts
function findMockRedirect (line 7) | function findMockRedirect(
constant NODE_BUILTIN_NAMESPACE (line 81) | const NODE_BUILTIN_NAMESPACE = 'node:'
function isNodeBuiltin (line 82) | function isNodeBuiltin(id: string): boolean {
FILE: packages/mocker/src/node/resolver.ts
type ServerResolverOptions (line 8) | interface ServerResolverOptions {
constant VALID_ID_PREFIX (line 15) | const VALID_ID_PREFIX = '/@id/'
class ServerMockResolver (line 17) | class ServerMockResolver {
method constructor (line 18) | constructor(
method resolveMock (line 23) | async resolveMock(
method invalidate (line 51) | public invalidate(ids: string[]): void {
method resolveId (line 61) | public async resolveId(id: string, importer?: string): Promise<ServerI...
method normalizeResolveIdToUrl (line 75) | private normalizeResolveIdToUrl(resolved: { id: string }) {
method resolveMockId (line 106) | private async resolveMockId(rawId: string, importer: string) {
method resolveModule (line 123) | private resolveModule(rawId: string, resolved: Rollup.PartialResolvedI...
function isModuleDirectory (line 135) | function isModuleDirectory(config: ServerResolverOptions, path: string) {
type PartialManifest (line 142) | interface PartialManifest {
function getViteDepsManifest (line 151) | function getViteDepsManifest(config: ViteConfig) {
function getDepsCacheDir (line 174) | function getDepsCacheDir(config: ViteConfig): string {
function withTrailingSlash (line 178) | function withTrailingSlash(path: string): string {
FILE: packages/mocker/src/registry.ts
class MockerRegistry (line 1) | class MockerRegistry {
method clear (line 5) | clear(): void {
method keys (line 10) | keys(): IterableIterator<string> {
method add (line 14) | add(mock: MockedModule): void {
method register (line 48) | public register(
method delete (line 134) | public delete(id: string): void {
method deleteById (line 138) | public deleteById(id: string): void {
method get (line 142) | public get(id: string): MockedModule | undefined {
method getById (line 146) | public getById(id: string): MockedModule | undefined {
method has (line 150) | public has(id: string): boolean {
type MockedModule (line 155) | type MockedModule
type MockedModuleType (line 160) | type MockedModuleType = 'automock' | 'autospy' | 'manual' | 'redirect'
type MockedModuleSerialized (line 162) | type MockedModuleSerialized
class AutomockedModule (line 168) | class AutomockedModule {
method constructor (line 171) | constructor(
method fromJSON (line 177) | static fromJSON(data: AutomockedModuleSerialized): AutospiedModule {
method toJSON (line 181) | toJSON(): AutomockedModuleSerialized {
type AutomockedModuleSerialized (line 191) | interface AutomockedModuleSerialized {
class AutospiedModule (line 198) | class AutospiedModule {
method constructor (line 201) | constructor(
method fromJSON (line 207) | static fromJSON(data: AutospiedModuleSerialized): AutospiedModule {
method toJSON (line 211) | toJSON(): AutospiedModuleSerialized {
type AutospiedModuleSerialized (line 221) | interface AutospiedModuleSerialized {
class RedirectedModule (line 228) | class RedirectedModule {
method constructor (line 231) | constructor(
method fromJSON (line 238) | static fromJSON(data: RedirectedModuleSerialized): RedirectedModule {
method toJSON (line 242) | toJSON(): RedirectedModuleSerialized {
type RedirectedModuleSerialized (line 253) | interface RedirectedModuleSerialized {
class ManualMockedModule (line 261) | class ManualMockedModule<T = any> {
method constructor (line 265) | constructor(
method resolve (line 272) | resolve(): T {
method fromJSON (line 301) | static fromJSON(data: ManualMockedModuleSerialized, factory: () => any...
method toJSON (line 305) | toJSON(): ManualMockedModuleSerialized {
function createHelpfulError (line 315) | function createHelpfulError(cause: Error) {
function assertValidExports (line 325) | function assertValidExports(raw: string, exports: any) {
type ManualMockedModuleSerialized (line 333) | interface ManualMockedModuleSerialized {
FILE: packages/mocker/src/types.ts
type Awaitable (line 3) | type Awaitable<T> = T | PromiseLike<T>
type ModuleMockFactoryWithHelper (line 5) | type ModuleMockFactoryWithHelper<M = unknown> = (
type ModuleMockFactory (line 8) | type ModuleMockFactory = () => any
type ModuleMockOptions (line 9) | interface ModuleMockOptions {
type ServerMockResolution (line 13) | interface ServerMockResolution {
type ServerIdResolution (line 21) | interface ServerIdResolution {
type ModuleMockContext (line 27) | interface ModuleMockContext {
type TestModuleMocker (line 34) | interface TestModuleMocker {
FILE: packages/mocker/src/utils.ts
function cleanUrl (line 2) | function cleanUrl(url: string): string {
function createManualModuleSource (line 6) | function createManualModuleSource(moduleUrl: string, exports: string[], ...
FILE: packages/pretty-format/rollup.config.js
method transform (line 32) | transform(code) {
function onwarn (line 74) | function onwarn(message) {
FILE: packages/pretty-format/src/collections.ts
function getKeysOfEnumerableProperties (line 11) | function getKeysOfEnumerableProperties(object: Record<string, unknown>, ...
function printIteratorEntries (line 32) | function printIteratorEntries(
function printIteratorValues (line 96) | function printIteratorValues(
function printListItems (line 144) | function printListItems(
function printObjectProperties (line 199) | function printObjectProperties(
FILE: packages/pretty-format/src/index.ts
function getConstructorName (line 44) | function getConstructorName(val: new (...args: Array<any>) => unknown) {
function isWindow (line 49) | function isWindow(val: unknown) {
constant SYMBOL_REGEXP (line 54) | const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/
constant NEWLINE_REGEXP (line 55) | const NEWLINE_REGEXP = /\n/g
class PrettyFormatPluginError (line 57) | class PrettyFormatPluginError extends Error {
method constructor (line 58) | constructor(message: string, stack: string) {
function isToStringedArrayType (line 65) | function isToStringedArrayType(toStringed: string): boolean {
function printNumber (line 82) | function printNumber(val: number): string {
function printBigInt (line 86) | function printBigInt(val: bigint): string {
function printFunction (line 90) | function printFunction(val: Function, printFunctionName: boolean): string {
function printSymbol (line 97) | function printSymbol(val: symbol): string {
function printError (line 101) | function printError(val: Error): string {
function printBasicValue (line 109) | function printBasicValue(
function printComplexValue (line 188) | function printComplexValue(
method serialize (line 287) | serialize(val: Error, config, indentation, depth, refs, printer) {
function isNewPlugin (line 314) | function isNewPlugin(plugin: Plugin): plugin is NewPlugin {
function printPlugin (line 318) | function printPlugin(
function findPlugin (line 360) | function findPlugin(plugins: Plugins, val: unknown) {
function printer (line 375) | function printer(
constant DEFAULT_THEME (line 408) | const DEFAULT_THEME: Theme = {
constant DEFAULT_THEME_KEYS (line 416) | const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME) as Array<
constant DEFAULT_OPTIONS (line 420) | const DEFAULT_OPTIONS: Options = {
function validateOptions (line 437) | function validateOptions(options: OptionsReceived) {
function getColorsHighlight (line 451) | function getColorsHighlight(): Colors {
function getColorsEmpty (line 471) | function getColorsEmpty(): Colors {
function getPrintFunctionName (line 478) | function getPrintFunctionName(options?: OptionsReceived) {
function getEscapeRegex (line 482) | function getEscapeRegex(options?: OptionsReceived) {
function getEscapeString (line 486) | function getEscapeString(options?: OptionsReceived) {
function getConfig (line 490) | function getConfig(options?: OptionsReceived): Config {
function createIndent (line 515) | function createIndent(indent: number): string {
function format (line 524) | function format(val: unknown, options?: OptionsReceived): string {
FILE: packages/pretty-format/src/plugins/AsymmetricMatcher.ts
constant SPACE (line 15) | const SPACE = ' '
FILE: packages/pretty-format/src/plugins/DOMCollection.ts
constant SPACE (line 11) | const SPACE = ' '
constant OBJECT_NAMES (line 13) | const OBJECT_NAMES = new Set(['DOMStringMap', 'NamedNodeMap'])
constant ARRAY_REGEXP (line 14) | const ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/
function testName (line 16) | function testName(name: any) {
function isNamedNodeMap (line 26) | function isNamedNodeMap(collection: object): collection is NamedNodeMap {
FILE: packages/pretty-format/src/plugins/DOMElement.ts
constant ELEMENT_NODE (line 19) | const ELEMENT_NODE = 1
constant TEXT_NODE (line 20) | const TEXT_NODE = 3
constant COMMENT_NODE (line 21) | const COMMENT_NODE = 8
constant FRAGMENT_NODE (line 22) | const FRAGMENT_NODE = 11
constant ELEMENT_REGEXP (line 24) | const ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/
function testHasAttribute (line 26) | function testHasAttribute(val: any) {
function testNode (line 35) | function testNode(val: any) {
type HandledType (line 54) | type HandledType = Element | Text | Comment | DocumentFragment
function nodeIsText (line 56) | function nodeIsText(node: HandledType): node is Text {
function nodeIsComment (line 60) | function nodeIsComment(node: HandledType): node is Comment {
function nodeIsFragment (line 64) | function nodeIsFragment(node: HandledType): node is DocumentFragment {
type FilterConfig (line 68) | interface FilterConfig extends Config {
function filterChildren (line 72) | function filterChildren(children: any[], filterNode?: (node: any) => boo...
function serializeDOM (line 93) | function serializeDOM(
function createDOMElementFilter (line 172) | function createDOMElementFilter(filterNode?: (node: any) => boolean): Ne...
FILE: packages/pretty-format/src/plugins/Immutable.ts
constant IS_ITERABLE_SENTINEL (line 12) | const IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'
constant IS_LIST_SENTINEL (line 13) | const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'
constant IS_KEYED_SENTINEL (line 14) | const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'
constant IS_MAP_SENTINEL (line 15) | const IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'
constant IS_ORDERED_SENTINEL (line 16) | const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'
constant IS_RECORD_SENTINEL (line 17) | const IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@' // immutable v4
constant IS_SEQ_SENTINEL (line 18) | const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'
constant IS_SET_SENTINEL (line 19) | const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'
constant IS_STACK_SENTINEL (line 20) | const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'
constant SPACE (line 24) | const SPACE = ' '
constant LAZY (line 25) | const LAZY = '…' // Seq is lazy if it calls a method like filter
function printImmutableEntries (line 27) | function printImmutableEntries(
function getRecordEntries (line 50) | function getRecordEntries(val: any): Iterator<any> {
function printImmutableRecord (line 63) | function printImmutableRecord(val: any, config: Config, indentation: str...
function printImmutableSeq (line 79) | function printImmutableSeq(val: any, config: Config, indentation: string...
function printImmutableValues (line 119) | function printImmutableValues(val: any, config: Config, indentation: str...
FILE: packages/pretty-format/src/plugins/ReactElement.ts
function getChildren (line 43) | function getChildren(arg: unknown, children: Array<unknown> = []) {
function getType (line 55) | function getType(element: any) {
function getPropKeys (line 99) | function getPropKeys(element: any) {
FILE: packages/pretty-format/src/plugins/ReactTestComponent.ts
type ReactTestObject (line 16) | interface ReactTestObject {
type ReactTestChild (line 24) | type ReactTestChild = ReactTestObject | string | number
function getPropKeys (line 31) | function getPropKeys(object: ReactTestObject) {
FILE: packages/pretty-format/src/plugins/lib/escapeHTML.ts
function escapeHTML (line 8) | function escapeHTML(str: string): string {
FILE: packages/pretty-format/src/plugins/lib/markup.ts
function printProps (line 12) | function printProps(
function printChildren (line 62) | function printChildren(children: Array<unknown>, config: Config, indenta...
function printShadowRoot (line 75) | function printShadowRoot(children: Array<unknown>, config: Config, inden...
function printText (line 92) | function printText(text: string, config: Config): string {
function printComment (line 97) | function printComment(comment: string, config: Config): string {
function printElement (line 108) | function printElement(type: string, printedProps: string, printedChildre...
function printElementAsLeaf (line 124) | function printElementAsLeaf(type: string, config: Config): string {
FILE: packages/pretty-format/src/types.ts
type Colors (line 8) | interface Colors {
type Indent (line 15) | type Indent = (arg0: string) => string
type Refs (line 16) | type Refs = Array<unknown>
type Print (line 17) | type Print = (arg0: unknown) => string
type Theme (line 19) | type Theme = Required<{
type CompareKeys (line 30) | type CompareKeys = ((a: string, b: string) => number) | null | undefined
type RequiredOptions (line 32) | type RequiredOptions = Required<PrettyFormatOptions>
type Options (line 34) | interface Options
type PrettyFormatOptions (line 40) | interface PrettyFormatOptions {
type OptionsReceived (line 56) | type OptionsReceived = PrettyFormatOptions
type Config (line 58) | interface Config {
type Printer (line 76) | type Printer = (
type Test (line 85) | type Test = (arg0: any) => boolean
type NewPlugin (line 87) | interface NewPlugin {
type PluginOptions (line 99) | interface PluginOptions {
type OldPlugin (line 105) | interface OldPlugin {
type Plugin (line 116) | type Plugin = NewPlugin | OldPlugin
type Plugins (line 118) | type Plugins = Array<Plugin>
FILE: packages/runner/rollup.config.js
function onwarn (line 60) | function onwarn(message) {
FILE: packages/runner/src/artifact.ts
function recordArtifact (line 41) | async function recordArtifact<Artifact extends TestArtifact>(task: Test,...
function encodeUint8Array (line 97) | function encodeUint8Array(bytes: Uint8Array): string {
function recordAsyncOperation (line 137) | function recordAsyncOperation<T>(
function manageArtifactAttachment (line 170) | function manageArtifactAttachment(attachment: TestAttachment): void {
FILE: packages/runner/src/collect.ts
function collectTests (line 23) | async function collectTests(
function mergeHooks (line 148) | function mergeHooks(baseHooks: SuiteHooks, hooks: SuiteHooks): SuiteHooks {
FILE: packages/runner/src/context.ts
function collectTask (line 26) | function collectTask(task: SuiteCollector): void {
function runWithSuite (line 30) | async function runWithSuite(
function withTimeout (line 40) | function withTimeout<T extends (...args: any[]) => any>(
function withCancel (line 114) | function withCancel<T extends (...args: any[]) => any>(
function abortIfTimeout (line 141) | function abortIfTimeout([context]: [TestContext?, unknown?], error: Erro...
function abortContextSignal (line 147) | function abortContextSignal(context: TestContext, error: Error): void {
function createTestContext (line 152) | function createTestContext(
function makeTimeoutError (line 246) | function makeTimeoutError(isHook: boolean, timeout: number, stackTraceEr...
FILE: packages/runner/src/errors.ts
class PendingError (line 4) | class PendingError extends Error {
method constructor (line 8) | constructor(public message: string, task: TaskBase, public note: strin...
class TestRunAbortError (line 14) | class TestRunAbortError extends Error {
method constructor (line 17) | constructor(message: string, reason: CancelReason) {
class FixtureDependencyError (line 23) | class FixtureDependencyError extends Error {
class FixtureAccessError (line 27) | class FixtureAccessError extends Error {
class FixtureParseError (line 31) | class FixtureParseError extends Error {
class AroundHookSetupError (line 35) | class AroundHookSetupError extends Error {
class AroundHookTeardownError (line 39) | class AroundHookTeardownError extends Error {
class AroundHookMultipleCallsError (line 43) | class AroundHookMultipleCallsError extends Error {
FILE: packages/runner/src/fixture.ts
constant FIXTURE_STACK_TRACE_KEY (line 8) | const FIXTURE_STACK_TRACE_KEY = Symbol.for('VITEST_FIXTURE_STACK_TRACE')
type TestFixtureItem (line 10) | interface TestFixtureItem extends FixtureOptions {
type UserFixtures (line 19) | type UserFixtures = Record<string, unknown>
type FixtureRegistrations (line 20) | type FixtureRegistrations = Map<string, TestFixtureItem>
class TestFixtures (line 22) | class TestFixtures {
method clearDefinitions (line 41) | static clearDefinitions(): void {
method getWorkerContexts (line 45) | static getWorkerContexts(): Record<string, any>[] {
method getFileContexts (line 49) | static getFileContexts(file: File): Record<string, any>[] {
method isFixtureOptions (line 53) | static isFixtureOptions(obj: unknown): boolean {
method constructor (line 57) | constructor(registrations?: FixtureRegistrations) {
method extend (line 63) | extend(runner: VitestRunner, userFixtures: UserFixtures): TestFixtures {
method get (line 70) | get(suite: Suite): FixtureRegistrations {
method override (line 86) | override(runner: VitestRunner, userFixtures: UserFixtures): void {
method getFileContext (line 104) | getFileContext(file: File): Record<string, any> {
method getWorkerContext (line 111) | getWorkerContext(): Record<string, any> {
method parseUserFixtures (line 118) | private parseUserFixtures(
function callFixtureCleanup (line 245) | async function callFixtureCleanup(context: object): Promise<void> {
function getFixtureCleanupCount (line 257) | function getFixtureCleanupCount(context: object): number {
function callFixtureCleanupFrom (line 266) | async function callFixtureCleanupFrom(context: object, fromIndex: number...
type SuiteHook (line 281) | type SuiteHook = 'beforeAll' | 'afterAll' | 'aroundAll'
type WithFixturesOptions (line 283) | interface WithFixturesOptions {
function withFixtures (line 312) | function withFixtures(fn: Function, options?: WithFixturesOptions) {
function isFixtureFunction (line 424) | function isFixtureFunction(value: unknown): value is FixtureFn<any, any,...
function resolveTestFixtureValue (line 428) | function resolveTestFixtureValue(
function resolveScopeFixtureValue (line 447) | async function resolveScopeFixtureValue(
function resolveFixtureFunction (line 488) | async function resolveFixtureFunction(
function resolveDeps (line 543) | function resolveDeps(
function validateSuiteHook (line 585) | function validateSuiteHook(fn: Function, hook: SuiteHook, suiteError: Er...
type FixturePropsOptions (line 604) | interface FixturePropsOptions {
function configureProps (line 609) | function configureProps(fn: Function, options: FixturePropsOptions): void {
function memoProps (line 616) | function memoProps(fn: Function, props: Set<string>): Set<string> {
type PropsParserOptions (line 621) | interface PropsParserOptions {
function getUsedProps (line 626) | function getUsedProps(fn: Function, { sourceError, suiteHook }: PropsPar...
function splitByComma (line 693) | function splitByComma(s: string) {
FILE: packages/runner/src/hooks.ts
function getDefaultHookTimeout (line 26) | function getDefaultHookTimeout() {
constant CLEANUP_TIMEOUT_KEY (line 30) | const CLEANUP_TIMEOUT_KEY = Symbol.for('VITEST_CLEANUP_TIMEOUT')
constant CLEANUP_STACK_TRACE_KEY (line 31) | const CLEANUP_STACK_TRACE_KEY = Symbol.for('VITEST_CLEANUP_STACK_TRACE')
constant AROUND_TIMEOUT_KEY (line 32) | const AROUND_TIMEOUT_KEY = Symbol.for('VITEST_AROUND_TIMEOUT')
constant AROUND_STACK_TRACE_KEY (line 33) | const AROUND_STACK_TRACE_KEY = Symbol.for('VITEST_AROUND_STACK_TRACE')
function getBeforeHookCleanupCallback (line 35) | function getBeforeHookCleanupCallback(hook: Function, result: any, conte...
function beforeAll (line 76) | function beforeAll<ExtraContext = object>(
function afterAll (line 118) | function afterAll<ExtraContext = object>(
function beforeEach (line 154) | function beforeEach<ExtraContext = object>(
function afterEach (line 201) | function afterEach<ExtraContext = object>(
function aroundAll (line 323) | function aroundAll<ExtraContext = object>(
function aroundEach (line 377) | function aroundEach<ExtraContext = object>(
function withSuiteFixtures (line 405) | function withSuiteFixtures(
function getAroundHookTimeout (line 432) | function getAroundHookTimeout(hook: Function): number {
function getAroundHookStackTrace (line 438) | function getAroundHookStackTrace(hook: Function): Error | undefined {
function createTestHook (line 444) | function createTestHook<T>(
FILE: packages/runner/src/map.ts
function setFn (line 10) | function setFn(key: Test, fn: () => Awaitable<void>): void {
function getFn (line 14) | function getFn<Task = Test>(key: Task): () => Awaitable<void> {
function setTestFixture (line 18) | function setTestFixture(
function getTestFixtures (line 25) | function getTestFixtures<Context = TestContext>(key: Context): TestFixtu...
function setHooks (line 29) | function setHooks(key: Suite, hooks: SuiteHooks): void {
function getHooks (line 33) | function getHooks(key: Suite): SuiteHooks {
FILE: packages/runner/src/run.ts
function getRetryCount (line 45) | function getRetryCount(retry: number | { count?: number } | undefined): ...
function getRetryDelay (line 55) | function getRetryDelay(retry: number | { delay?: number } | undefined): ...
function getRetryCondition (line 65) | function getRetryCondition(
function updateSuiteHookState (line 77) | function updateSuiteHookState(
function getSuiteHooks (line 107) | function getSuiteHooks(
function callTestHooks (line 119) | async function callTestHooks(
function callSuiteHook (line 167) | async function callSuiteHook<T extends keyof SuiteHooks>(
function getAroundEachHooks (line 226) | function getAroundEachHooks(suite: Suite): AroundEachListener[] {
function getAroundAllHooks (line 236) | function getAroundAllHooks(suite: Suite): RegisteredAroundAllListener[] {
type AroundHooksOptions (line 240) | interface AroundHooksOptions<THook extends Function> {
function makeAroundHookTimeoutError (line 248) | function makeAroundHookTimeoutError(
function callAroundHooks (line 263) | async function callAroundHooks<THook extends Function>(
function callAroundAllHooks (line 441) | async function callAroundAllHooks(
function callAroundEachHooks (line 453) | async function callAroundEachHooks(
function sendTasksUpdate (line 477) | function sendTasksUpdate(runner: VitestRunner): void {
function finishSendTasksUpdate (line 497) | async function finishSendTasksUpdate(runner: VitestRunner): Promise<void> {
function throttle (line 502) | function throttle<T extends (...args: any[]) => void>(fn: T, ms: number)...
function updateTask (line 525) | function updateTask(event: TaskUpdateEvent, task: Task, runner: VitestRu...
function callCleanupHooks (line 531) | async function callCleanupHooks(runner: VitestRunner, cleanups: unknown[...
function passesRetryCondition (line 561) | function passesRetryCondition(test: Test, errors: TestError[] | undefine...
function runTest (line 584) | async function runTest(test: Test, runner: VitestRunner): Promise<void> {
function failTask (line 787) | function failTask(result: TaskResult, err: unknown, diffOptions: DiffOpt...
function markTasksAsSkipped (line 812) | function markTasksAsSkipped(suite: Suite, runner: VitestRunner) {
function markPendingTasksAsSkipped (line 823) | function markPendingTasksAsSkipped(suite: Suite, runner: VitestRunner, n...
function runSuite (line 837) | async function runSuite(suite: Suite, runner: VitestRunner): Promise<voi...
function runSuiteChild (line 975) | async function runSuiteChild(c: Task, runner: VitestRunner) {
function runFiles (line 1008) | async function runFiles(files: File[], runner: VitestRunner): Promise<vo...
function defaultTrace (line 1036) | function defaultTrace<T>(_: string, attributes: any, cb?: () => T): T {
function startTests (line 1043) | async function startTests(specs: string[] | FileSpecification[], runner:...
function publicCollect (line 1092) | async function publicCollect(specs: string[] | FileSpecification[], runn...
FILE: packages/runner/src/setup.ts
function runSetupFiles (line 3) | async function runSetupFiles(
FILE: packages/runner/src/suite.ts
function assert (line 192) | function assert(condition: any, message: string) {
function getDefaultSuite (line 204) | function getDefaultSuite(): SuiteCollector<object> {
function getTestFilepath (line 209) | function getTestFilepath(): string {
function getRunner (line 213) | function getRunner(): VitestRunner {
function createDefaultSuite (line 218) | function createDefaultSuite(runner: VitestRunner) {
function clearCollectorContext (line 230) | function clearCollectorContext(
function getCurrentSuite (line 245) | function getCurrentSuite<ExtraContext = object>(): SuiteCollector<ExtraC...
function createSuiteHooks (line 252) | function createSuiteHooks(): SuiteHooks {
constant POSITIVE_INFINITY (line 263) | const POSITIVE_INFINITY = Number.POSITIVE_INFINITY
function parseArguments (line 265) | function parseArguments<T extends (...args: any[]) => any>(
function createSuiteCollector (line 304) | function createSuiteCollector(
function withAwaitAsyncAssertions (line 567) | function withAwaitAsyncAssertions<T extends (...args: any[]) => any>(fn:...
function createSuite (line 584) | function createSuite() {
function createTaskCollector (line 744) | function createTaskCollector(
function createTest (line 978) | function createTest(
function formatName (line 989) | function formatName(name: string | Function) {
function formatTitle (line 997) | function formatTitle(template: string, items: any[], idx: number) {
function handleRegexMatch (line 1060) | function handleRegexMatch(
function formatTemplateString (line 1079) | function formatTemplateString(cases: any[], args: any[]): any[] {
FILE: packages/runner/src/test-state.ts
function setCurrentTest (line 5) | function setCurrentTest<T extends Test>(test: T | undefined): void {
function getCurrentTest (line 9) | function getCurrentTest<T extends Test | undefined>(): T {
function addRunningTest (line 14) | function addRunningTest(test: Test): () => void {
function getRunningTests (line 21) | function getRunningTests(): Array<Test> {
FILE: packages/runner/src/types/runner.ts
type VitestRunnerConfig (line 22) | interface VitestRunnerConfig {
type FileSpecification (line 53) | interface FileSpecification {
type TestTagDefinition (line 64) | interface TestTagDefinition extends Omit<TestOptions, 'tags' | 'shuffle'> {
type VitestRunnerImportSource (line 83) | type VitestRunnerImportSource = 'collect' | 'setup'
type VitestRunnerConstructor (line 85) | interface VitestRunnerConstructor {
type CancelReason (line 89) | type CancelReason
type VitestRunner (line 94) | interface VitestRunner {
FILE: packages/runner/src/types/tasks.ts
type RunMode (line 6) | type RunMode = 'run' | 'skip' | 'only' | 'todo' | 'queued'
type TaskState (line 7) | type TaskState = RunMode | 'pass' | 'fail'
type TaskBase (line 9) | interface TaskBase {
type TaskPopulated (line 120) | interface TaskPopulated extends TaskBase {
type TaskMeta (line 148) | interface TaskMeta {}
type TaskResult (line 153) | interface TaskResult {
type ImportDuration (line 203) | interface ImportDuration {
type TaskResultPack (line 221) | type TaskResultPack = [
type TaskEventData (line 236) | interface TaskEventData {
type TaskEventPack (line 241) | type TaskEventPack = [
type TaskUpdateEvent (line 256) | type TaskUpdateEvent
type Suite (line 272) | interface Suite extends TaskBase {
type File (line 284) | interface File extends Suite {
type Test (line 322) | interface Test<ExtraContext = object> extends TaskPopulated {
type Task (line 345) | type Task = Test | Suite | File
type TestFunction (line 347) | type TestFunction<ExtraContext = object> = (
type ExtractEachCallbackArgs (line 352) | type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {
type EachFunctionReturn (line 386) | interface EachFunctionReturn<T extends any[]> {
type TestEachFunction (line 399) | interface TestEachFunction {
type ChainableTestAPI (line 467) | type ChainableTestAPI<ExtraContext = object> = ChainableFunction<
type TestCollectorOptions (line 476) | type TestCollectorOptions = Omit<TestOptions, 'shuffle'>
type Retry (line 482) | type Retry = number | {
type SerializableRetry (line 510) | type SerializableRetry = number | {
type TestOptions (line 530) | interface TestOptions {
type TestTags (line 587) | interface TestTags {}
type SuiteOptions (line 589) | interface SuiteOptions extends TestOptions {
type ExtendedAPI (line 596) | interface ExtendedAPI<ExtraContext> {
type Hooks (line 601) | interface Hooks<ExtraContext> {
type TestAPI (line 617) | type TestAPI<ExtraContext = object> = ChainableTestAPI<ExtraContext>
type InternalTestContext (line 802) | interface InternalTestContext extends Record<
type FixtureOptions (line 809) | interface FixtureOptions {
type TestScopeFixtureOptions (line 835) | interface TestScopeFixtureOptions extends Omit<FixtureOptions, 'scope'> {
type FileScopeFixtureOptions (line 846) | interface FileScopeFixtureOptions extends Omit<FixtureOptions, 'scope'> {
type WorkerScopeFixtureOptions (line 857) | interface WorkerScopeFixtureOptions extends Omit<FixtureOptions, 'scope'> {
type Use (line 864) | type Use<T> = (value: T) => Promise<void>
type OnCleanup (line 874) | type OnCleanup = (cleanup: () => Awaitable<void>) => void
type BuilderFixtureFn (line 886) | type BuilderFixtureFn<T, Context> = (
type ExtractSuiteContext (line 891) | type ExtractSuiteContext<C>
type ExtractBuilderWorker (line 899) | type ExtractBuilderWorker<C> = C extends { $__worker?: infer W }
type ExtractBuilderFile (line 906) | type ExtractBuilderFile<C> = C extends { $__file?: infer F }
type ExtractBuilderTest (line 913) | type ExtractBuilderTest<C> = C extends { $__test?: infer T }
type AddBuilderWorker (line 920) | type AddBuilderWorker<C, K extends string, V> = Omit<C, '$__worker'> & R...
type AddBuilderFile (line 929) | type AddBuilderFile<C, K extends string, V> = Omit<C, '$__file'> & Recor...
type AddBuilderTest (line 938) | type AddBuilderTest<C, K extends string, V> = Omit<C, '$__test'> & Recor...
type WorkerScopeContext (line 950) | type WorkerScopeContext<C> = ExtractBuilderWorker<C>
type FileScopeContext (line 958) | type FileScopeContext<C> = ExtractBuilderWorker<C> & ExtractBuilderFile<C>
type TestScopeContext (line 963) | type TestScopeContext<C> = C & TestContext
type FixtureFn (line 964) | type FixtureFn<T, K extends keyof T, ExtraContext> = (
type Fixture (line 968) | type Fixture<T, K extends keyof T, ExtraContext = object> = ((
type ScopedFixtureFn (line 982) | type ScopedFixtureFn<Value, Context> = (
type Fixtures (line 991) | type Fixtures<T, ExtraContext = object> = {
type ScopedFixturesDef (line 1011) | interface ScopedFixturesDef {
type ExtractScopedFixtures (line 1021) | type ExtractScopedFixtures<T extends ScopedFixturesDef>
type ScopedFixturesObject (line 1032) | type ScopedFixturesObject<T extends ScopedFixturesDef, ExtraContext = ob...
type InferFixturesTypes (line 1048) | type InferFixturesTypes<T> = T extends TestAPI<infer C> ? C : T
type SuiteCollectorCallable (line 1050) | interface SuiteCollectorCallable<ExtraContext = object> {
type ChainableSuiteAPI (line 1063) | type ChainableSuiteAPI<ExtraContext = object> = ChainableFunction<
type SuiteAPI (line 1072) | type SuiteAPI<ExtraContext = object> = ChainableSuiteAPI<ExtraContext> & {
type BeforeAllListener (line 1079) | interface BeforeAllListener<ExtraContext = object> {
type AfterAllListener (line 1083) | interface AfterAllListener<ExtraContext = object> {
type BeforeEachListener (line 1087) | interface BeforeEachListener<ExtraContext = object> {
type AfterEachListener (line 1094) | interface AfterEachListener<ExtraContext = object> {
type AroundEachListener (line 1101) | interface AroundEachListener<ExtraContext = object> {
type AroundAllListener (line 1109) | interface AroundAllListener<ExtraContext = object> {
type RegisteredAllListener (line 1118) | interface RegisteredAllListener {
type RegisteredAroundAllListener (line 1122) | interface RegisteredAroundAllListener {
type SuiteHooks (line 1129) | interface SuiteHooks<ExtraContext = object> {
type TaskCustomOptions (line 1139) | interface TaskCustomOptions extends TestOptions {
type SuiteCollector (line 1156) | interface SuiteCollector<ExtraContext = object> {
type SuiteFactory (line 1178) | type SuiteFactory<ExtraContext = object> = (
type RuntimeContext (line 1182) | interface RuntimeContext {
type TestContext (line 1190) | interface TestContext {
type OnTestFailedHandler (line 1237) | type OnTestFailedHandler = (context: TestContext) => Awaitable<void>
type OnTestFinishedHandler (line 1238) | type OnTestFinishedHandler = (context: TestContext) => Awaitable<void>
type TaskHook (line 1240) | interface TaskHook<HookListener> {
type SequenceHooks (line 1244) | type SequenceHooks = 'stack' | 'list' | 'parallel'
type SequenceSetupFiles (line 1245) | type SequenceSetupFiles = 'list' | 'parallel'
type WriteableTestContext (line 1247) | type WriteableTestContext = {
type TestAttachment (line 1259) | interface TestAttachment {
type Location (line 1268) | interface Location {
type FileLocation (line 1275) | interface FileLocation extends Location {
type TestArtifactLocation (line 1289) | interface TestArtifactLocation extends FileLocation {}
type TestArtifactBase (line 1300) | interface TestArtifactBase {
type TestAnnotationLocation (line 1312) | type TestAnnotationLocation = TestArtifactLocation
type TestAnnotation (line 1314) | interface TestAnnotation {
type TestAnnotationArtifact (line 1326) | interface TestAnnotationArtifact extends TestArtifactBase {
type VisualRegressionArtifactAttachment (line 1331) | interface VisualRegressionArtifactAttachment extends TestAttachment {
type VisualRegressionArtifact (line 1342) | interface VisualRegressionArtifact extends TestArtifactBase {
type FailureScreenshotArtifactAttachment (line 1349) | interface FailureScreenshotArtifactAttachment extends TestAttachment {
type FailureScreenshotArtifact (line 1361) | interface FailureScreenshotArtifact extends TestArtifactBase {
type TestArtifactRegistry (line 1438) | interface TestArtifactRegistry {}
type TestArtifact (line 1447) | type TestArtifact
FILE: packages/runner/src/utils/chain.ts
type ChainableFunction (line 3) | type ChainableFunction<
function getChainableContext (line 18) | function getChainableContext(chainable: any): InternalChainableContext |...
function createChainable (line 22) | function createChainable<T extends string, Args extends any[], R = any>(
FILE: packages/runner/src/utils/collect.ts
function interpretTaskModes (line 10) | function interpretTaskModes(
function getTaskFullName (line 127) | function getTaskFullName(task: TaskBase): string {
function someTasksAreOnly (line 131) | function someTasksAreOnly(suite: Suite): boolean {
function skipAllTasks (line 137) | function skipAllTasks(suite: Suite) {
function todoAllTasks (line 147) | function todoAllTasks(suite: Suite) {
function checkAllowOnly (line 158) | function checkAllowOnly(task: TaskBase, allowOnly?: boolean) {
function generateHash (line 174) | function generateHash(str: string): string {
function calculateSuiteHash (line 187) | function calculateSuiteHash(parent: Suite): void {
function createFileTask (line 196) | function createFileTask(
function generateFileHash (line 228) | function generateFileHash(
function findTestFileStackTrace (line 235) | function findTestFileStackTrace(testFilePath: string, error: string): Pa...
FILE: packages/runner/src/utils/limit-concurrency.ts
type QueueNode (line 2) | type QueueNode<T> = [value: T, next?: QueueNode<T>]
type ConcurrencyLimiter (line 4) | interface ConcurrencyLimiter extends ConcurrencyLimiterFn {
type ConcurrencyLimiterFn (line 8) | type ConcurrencyLimiterFn = <Args extends unknown[], T>(func: (...args: ...
function limitConcurrency (line 13) | function limitConcurrency(concurrency: number = Infinity): ConcurrencyLi...
FILE: packages/runner/src/utils/suite.ts
function partitionSuiteChildren (line 6) | function partitionSuiteChildren(suite: Suite): Task[][] {
FILE: packages/runner/src/utils/tags.ts
function validateTags (line 3) | function validateTags(config: VitestRunnerConfig, tags: string[]): void {
function createNoTagsError (line 16) | function createNoTagsError(availableTags: TestTagDefinition[], tag: stri...
function createTagsFilter (line 25) | function createTagsFilter(tagsExpr: string[], availableTags: TestTagDefi...
type TagMatcher (line 32) | type TagMatcher = (tags: string[]) => boolean
function parseTagsExpression (line 34) | function parseTagsExpression(expr: string, availableTags: TestTagDefinit...
function formatToken (line 44) | function formatToken(token: Token): string {
type Token (line 51) | type Token
function tokenize (line 60) | function tokenize(expr: string): Token[] {
type ASTNode (line 139) | type ASTNode
class TokenStream (line 145) | class TokenStream {
method constructor (line 147) | constructor(private tokens: Token[], public expr: string) {}
method peek (line 149) | peek(): Token {
method next (line 153) | next(): Token {
method expect (line 157) | expect(type: Token['type']): Token {
method unexpectedToken (line 168) | unexpectedToken(): never {
function formatTokenType (line 177) | function formatTokenType(type: Token['type']): string {
function parseOrExpression (line 189) | function parseOrExpression(stream: TokenStream, availableTags: TestTagDe...
function parseAndExpression (line 201) | function parseAndExpression(stream: TokenStream, availableTags: TestTagD...
function parseUnaryExpression (line 213) | function parseUnaryExpression(stream: TokenStream, availableTags: TestTa...
function parsePrimaryExpression (line 223) | function parsePrimaryExpression(stream: TokenStream, availableTags: Test...
function createWildcardRegex (line 243) | function createWildcardRegex(pattern: string): RegExp {
function resolveTagPattern (line 247) | function resolveTagPattern(tagPattern: string, availableTags: TestTagDef...
function evaluateNode (line 263) | function evaluateNode(node: ASTNode, tags: string[]): boolean {
FILE: packages/runner/src/utils/tasks.ts
function isTestCase (line 5) | function isTestCase(s: Task): s is Test {
function getTests (line 9) | function getTests(suite: Arrayable<Task>): Test[] {
function getTasks (line 33) | function getTasks(tasks: Arrayable<Task> = []): Task[] {
function getSuites (line 39) | function getSuites(suite: Arrayable<Task>): Suite[] {
function hasTests (line 45) | function hasTests(suite: Arrayable<Suite>): boolean {
function hasFailed (line 51) | function hasFailed(suite: Arrayable<Task>): boolean {
function getNames (line 58) | function getNames(task: Task): string[] {
function getFullName (line 76) | function getFullName(task: Task, separator = ' > '): string {
function getTestName (line 80) | function getTestName(task: Task, separator = ' > '): string {
function createTaskName (line 84) | function createTaskName(names: readonly (string | undefined)[], separato...
FILE: packages/snapshot/rollup.config.js
function onwarn (line 64) | function onwarn(message) {
FILE: packages/snapshot/src/client.ts
function createMismatchError (line 6) | function createMismatchError(
type Context (line 29) | interface Context {
type AssertOptions (line 35) | interface AssertOptions {
type SnapshotClientOptions (line 53) | interface SnapshotClientOptions {
class SnapshotClient (line 57) | class SnapshotClient {
method constructor (line 60) | constructor(private options: SnapshotClientOptions = {}) {}
method setup (line 62) | async setup(
method finish (line 75) | async finish(filepath: string): Promise<SnapshotResult> {
method skipTest (line 82) | skipTest(filepath: string, testName: string): void {
method clearTest (line 87) | clearTest(filepath: string, testId: string): void {
method getSnapshotState (line 92) | getSnapshotState(filepath: string): SnapshotState {
method assert (line 102) | assert(options: AssertOptions): void {
method assertRaw (line 173) | async assertRaw(options: AssertOptions): Promise<void> {
method clear (line 202) | clear(): void {
FILE: packages/snapshot/src/env/node.ts
class NodeSnapshotEnvironment (line 5) | class NodeSnapshotEnvironment implements SnapshotEnvironment {
method constructor (line 6) | constructor(private options: SnapshotEnvironmentOptions = {}) {}
method getVersion (line 8) | getVersion(): string {
method getHeader (line 12) | getHeader(): string {
method resolveRawPath (line 16) | async resolveRawPath(testPath: string, rawPath: string): Promise<strin...
method resolvePath (line 20) | async resolvePath(filepath: string): Promise<string> {
method prepareDirectory (line 27) | async prepareDirectory(dirPath: string): Promise<void> {
method saveSnapshotFile (line 31) | async saveSnapshotFile(filepath: string, snapshot: string): Promise<vo...
method readSnapshotFile (line 36) | async readSnapshotFile(filepath: string): Promise<string | null> {
method removeSnapshotFile (line 43) | async removeSnapshotFile(filepath: string): Promise<void> {
FILE: packages/snapshot/src/manager.ts
class SnapshotManager (line 8) | class SnapshotManager {
method constructor (line 12) | constructor(
method clear (line 18) | clear(): void {
method add (line 22) | add(result: SnapshotResult): void {
method resolvePath (line 26) | resolvePath<T = any>(testPath: string, context?: T): string {
method resolveRawPath (line 39) | resolveRawPath(testPath: string, rawPath: string): string {
function emptySummary (line 44) | function emptySummary(
function addSnapshotResult (line 66) | function addSnapshotResult(
FILE: packages/snapshot/src/port/inlineSnapshot.ts
type InlineSnapshot (line 10) | interface InlineSnapshot {
function saveInlineSnapshots (line 18) | async function saveInlineSnapshots(
function replaceObjectSnap (line 50) | function replaceObjectSnap(
function getObjectShapeEndIndex (line 86) | function getObjectShapeEndIndex(code: string, index: number) {
function prepareSnapString (line 101) | function prepareSnapString(snap: string, source: string, index: number) {
function getCodeStartingAtIndex (line 128) | function getCodeStartingAtIndex(code: string, index: number) {
function replaceInlineSnap (line 151) | function replaceInlineSnap(
constant INDENTATION_REGEX (line 189) | const INDENTATION_REGEX = /^([^\S\n]*)\S/m
function stripSnapshotIndentation (line 190) | function stripSnapshotIndentation(inlineSnapshot: string): string {
FILE: packages/snapshot/src/port/plugins.ts
constant PLUGINS (line 25) | let PLUGINS: PrettyFormatPlugins = [
function addSerializer (line 35) | function addSerializer(plugin: PrettyFormatPlugin): void {
function getSerializers (line 39) | function getSerializers(): PrettyFormatPlugins {
FILE: packages/snapshot/src/port/rawSnapshot.ts
type RawSnapshotInfo (line 3) | interface RawSnapshotInfo {
type RawSnapshot (line 9) | interface RawSnapshot extends RawSnapshotInfo {
function saveRawSnapshots (line 14) | async function saveRawSnapshots(
FILE: packages/snapshot/src/port/state.ts
type SnapshotReturnOptions (line 37) | interface SnapshotReturnOptions {
type SaveStatus (line 45) | interface SaveStatus {
type ParsedStackPosition (line 50) | type ParsedStackPosition = Pick<ParsedStack, 'file' | 'line' | 'column'>
function isSameStackPosition (line 52) | function isSameStackPosition(x: ParsedStackPosition, y: ParsedStackPosit...
class SnapshotState (line 56) | class SnapshotState {
method added (line 78) | get added(): CounterMap<string> { return this._added }
method added (line 79) | set added(value: number) { this._added._total = value }
method matched (line 80) | get matched(): CounterMap<string> { return this._matched }
method matched (line 81) | set matched(value: number) { this._matched._total = value }
method unmatched (line 82) | get unmatched(): CounterMap<string> { return this._unmatched }
method unmatched (line 83) | set unmatched(value: number) { this._unmatched._total = value }
method updated (line 84) | get updated(): CounterMap<string> { return this._updated }
method updated (line 85) | set updated(value: number) { this._updated._total = value }
method constructor (line 87) | private constructor(
method create (line 112) | static async create(testFilePath: string, options: SnapshotStateOption...
method environment (line 122) | get environment(): SnapshotEnvironment {
method markSnapshotsAsCheckedForTest (line 126) | markSnapshotsAsCheckedForTest(testName: string): void {
method clearTest (line 137) | clearTest(testId: string): void {
method _inferInlineSnapshotStack (line 162) | protected _inferInlineSnapshotStack(stacks: ParsedStack[]): ParsedStac...
method _addSnapshot (line 188) | private _addSnapshot(
method save (line 212) | async save(): Promise<SaveStatus> {
method getUncheckedCount (line 254) | getUncheckedCount(): number {
method getUncheckedKeys (line 258) | getUncheckedKeys(): Array<string> {
method removeUncheckedKeys (line 262) | removeUncheckedKeys(): void {
method match (line 270) | match({
method pack (line 457) | async pack(): Promise<SnapshotResult> {
FILE: packages/snapshot/src/port/utils.ts
function testNameToKey (line 18) | function testNameToKey(testName: string, count: number): string {
function keyToTestName (line 22) | function keyToTestName(key: string): string {
function getSnapshotData (line 30) | function getSnapshotData(
function addExtraLineBreaks (line 67) | function addExtraLineBreaks(string: string): string {
function removeExtraLineBreaks (line 74) | function removeExtraLineBreaks(string: string): string {
function serialize (line 96) | function serialize(
function minify (line 112) | function minify(val: unknown): string {
function deserializeString (line 122) | function deserializeString(stringified: string): string {
function escapeBacktickString (line 126) | function escapeBacktickString(str: string): string {
function printBacktickString (line 130) | function printBacktickString(str: string): string {
function normalizeNewlines (line 134) | function normalizeNewlines(string: string): string {
function saveSnapshotFile (line 138) | async function saveSnapshotFile(
function saveSnapshotFileRaw (line 163) | async function saveSnapshotFileRaw(
function deepMergeArray (line 178) | function deepMergeArray(target: any[] = [], source: any[] = []) {
function deepMergeSnapshot (line 211) | function deepMergeSnapshot(target: any, source: any): any {
class DefaultMap (line 239) | class DefaultMap<K, V> extends Map<K, V> {
method constructor (line 240) | constructor(
method get (line 247) | override get(key: K): V {
class CounterMap (line 255) | class CounterMap<K> extends DefaultMap<K, number> {
method constructor (line 256) | constructor() {
method valueOf (line 267) | valueOf(): number {
method increment (line 271) | increment(key: K): void {
method total (line 278) | total(): number {
FILE: packages/snapshot/src/types/environment.ts
type SnapshotEnvironment (line 3) | interface SnapshotEnvironment {
type SnapshotEnvironmentOptions (line 14) | interface SnapshotEnvironmentOptions {
FILE: packages/snapshot/src/types/index.ts
type SnapshotData (line 12) | type SnapshotData = Record<string, string>
type SnapshotUpdateState (line 14) | type SnapshotUpdateState = 'all' | 'new' | 'none'
type SnapshotSerializer (line 16) | type SnapshotSerializer = PrettyFormatPlugin
type SnapshotStateOptions (line 18) | interface SnapshotStateOptions {
type SnapshotMatchOptions (line 26) | interface SnapshotMatchOptions {
type SnapshotResult (line 37) | interface SnapshotResult {
type UncheckedSnapshot (line 48) | interface UncheckedSnapshot {
type SnapshotSummary (line 53) | interface SnapshotSummary {
FILE: packages/spy/rollup.config.js
function onwarn (line 51) | function onwarn(message) {
FILE: packages/spy/src/index.ts
function isMockFunction (line 17) | function isMockFunction(fn: any): fn is Mock {
constant MOCK_RESTORE (line 23) | const MOCK_RESTORE = new Set<() => void>()
constant REGISTERED_MOCKS (line 27) | const REGISTERED_MOCKS = new Set<Mock<Procedure | Constructable>>()
constant MOCK_CONFIGS (line 28) | const MOCK_CONFIGS = new WeakMap<Mock<Procedure | Constructable>, MockCo...
function createMockInstance (line 30) | function createMockInstance(options: MockInstanceOption = {}): Mock<Proc...
function fn (line 244) | function fn<T extends Procedure | Constructable = Procedure>(
function spyOn (line 278) | function spyOn<T extends object, K extends keyof T>(
function getDescriptor (line 406) | function getDescriptor(obj: any, method: string | symbol | number): [any...
function assert (line 421) | function assert(condition: any, message: string): asserts condition {
function createMock (line 429) | function createMock(
function registerCalls (line 577) | function registerCalls(args: unknown[], state: MockContext, prototypeSta...
function registerInvocationOrder (line 582) | function registerInvocationOrder(order: number, state: MockContext, prot...
function registerResult (line 587) | function registerResult(result: MockResult<Procedure>, state: MockContex...
function registerSettledResult (line 592) | function registerSettledResult(result: MockSettledResult<Procedure>, sta...
function registerInstance (line 597) | function registerInstance(instance: MockReturnType<Procedure>, state: Mo...
function registerContext (line 603) | function registerContext(context: MockProcedureContext<Procedure>, state...
function copyOriginalStaticProperties (line 609) | function copyOriginalStaticProperties(mock: Mock<Procedure | Constructab...
function getAllProperties (line 630) | function getAllProperties(original: Procedure | Constructable) {
function getDefaultConfig (line 658) | function getDefaultConfig(original?: Procedure | Constructable): MockCon...
function getDefaultState (line 667) | function getDefaultState(): MockContext {
function restoreAllMocks (line 682) | function restoreAllMocks(): void {
function clearAllMocks (line 689) | function clearAllMocks(): void {
function resetAllMocks (line 693) | function resetAllMocks(): void {
function throwConstructorError (line 697) | function throwConstructorError(shorthand: string): never {
FILE: packages/spy/src/types.ts
type MockResultReturn (line 1) | interface MockResultReturn<T> {
type MockResultIncomplete (line 8) | interface MockResultIncomplete {
type MockResultThrow (line 12) | interface MockResultThrow {
type MockSettledResultIncomplete (line 20) | interface MockSettledResultIncomplete {
type MockSettledResultFulfilled (line 25) | interface MockSettledResultFulfilled<T> {
type MockSettledResultRejected (line 30) | interface MockSettledResultRejected {
type MockResult (line 35) | type MockResult<T>
type MockSettledResult (line 39) | type MockSettledResult<T>
type MockParameters (line 44) | type MockParameters<T extends Procedure | Constructable> = T extends Con...
type MockReturnType (line 49) | type MockReturnType<T extends Procedure | Constructable> = T extends Con...
type MockProcedureContext (line 54) | type MockProcedureContext<T extends Procedure | Constructable> = T exten...
type MockContext (line 58) | interface MockContext<T extends Procedure | Constructable = Procedure> {
type Procedure (line 172) | type Procedure = (...args: any[]) => any
type NormalizedProcedure (line 174) | type NormalizedProcedure<T extends Procedure | Constructable> = T extend...
type Methods (line 185) | type Methods<T> = keyof {
type Properties (line 188) | type Properties<T> = {
type Classes (line 192) | type Classes<T> = {
type MockInstance (line 209) | interface MockInstance<T extends Procedure | Constructable = Procedure> ...
type Mock (line 387) | type Mock<T extends Procedure | Constructable = Procedure> = MockInstanc...
type PartialMaybePromise (line 408) | type PartialMaybePromise<T> = T extends Promise<Awaited<T>>
type PartialResultFunction (line 412) | type PartialResultFunction<T> = T extends Constructable
type PartialMock (line 423) | type PartialMock<T extends Procedure | Constructable = Procedure> = Mock<
type DeepPartial (line 431) | type DeepPartial<T> = T extends Procedure
type DeepPartialMaybePromise (line 439) | type DeepPartialMaybePromise<T> = T extends Promise<Awaited<T>>
type DeepPartialResultFunction (line 443) | type DeepPartialResultFunction<T> = T extends Constructable
type DeepPartialMock (line 454) | type DeepPartialMock<T extends Procedure | Constructable = Procedure> = ...
type MaybeMockedConstructor (line 462) | type MaybeMockedConstructor<T> = T extends Constructable
type MockedFunction (line 465) | type MockedFunction<T extends Procedure | Constructable> = Mock<T>
type PartiallyMockedFunction (line 467) | type PartiallyMockedFunction<T extends Procedure | Constructable> = Part...
type MockedFunctionDeep (line 469) | type MockedFunctionDeep<T extends Procedure | Constructable> = Mock<T>
type PartiallyMockedFunctionDeep (line 471) | type PartiallyMockedFunctionDeep<T extends Procedure | Constructable> = ...
type MockedObject (line 473) | type MockedObject<T> = MaybeMockedConstructor<T> & {
type MockedObjectDeep (line 476) | type MockedObjectDeep<T> = MaybeMockedConstructor<T> & {
type MaybeMockedDeep (line 480) | type MaybeMockedDeep<T> = T extends Procedure | Constructable
type MaybePartiallyMockedDeep (line 486) | type MaybePartiallyMockedDeep<T> = T extends Procedure | Constructable
type MaybeMocked (line 492) | type MaybeMocked<T> = T extends Procedure | Constructable
type MaybePartiallyMocked (line 498) | type MaybePartiallyMocked<T> = T extends Procedure | Constructable
type Constructable (line 504) | interface Constructable {
type MockedClass (line 508) | type MockedClass<T extends Constructable> = MockInstance<T> & {
type Mocked (line 512) | type Mocked<T> = {
type MockConfig (line 520) | interface MockConfig {
type MockInstanceOption (line 527) | interface MockInstanceOption {
FILE: packages/ui/client/components/artifacts/visual-regression/SmallTabs.spec.ts
function createSmallTabs (line 9) | function createSmallTabs(children: number) {
FILE: packages/ui/client/components/artifacts/visual-regression/VisualRegressionSlider.spec.ts
method getByCSS (line 8) | getByCSS(selector: string) {
FILE: packages/ui/client/components/dashboard/DashboardEntry.spec.ts
function div (line 10) | function div(o: { testId: string; body: string }) {
FILE: packages/ui/client/components/views/ViewReport.spec.ts
function makeTextStack (line 14) | function makeTextStack() {
FILE: packages/ui/client/composables/api.ts
method setCurrentFileId (line 8) | setCurrentFileId(fileId: string) {
method setIframeViewport (line 13) | async setIframeViewport(width: number, height: number) {
FILE: packages/ui/client/composables/attachments.ts
function getAttachmentUrl (line 6) | function getAttachmentUrl(attachment: TestAttachment): string {
function sanitizeFilePath (line 19) | function sanitizeFilePath(s: string, contentType: string | undefined): s...
function isExternalAttachment (line 25) | function isExternalAttachment(attachment: TestAttachment): boolean {
function internalOrExternalUrl (line 30) | function internalOrExternalUrl(attachment: TestAttachment): string {
FILE: packages/ui/client/composables/browser.ts
type ViewportSize (line 3) | type ViewportSize
FILE: packages/ui/client/composables/client/index.ts
method onTestAnnotate (line 36) | onTestAnnotate(testId: string, annotation: TestAnnotation) {
method onTestArtifactRecord (line 39) | onTestArtifactRecord(testId, artifact) {
method onTaskUpdate (line 42) | onTaskUpdate(packs: RunnerTaskResultPack[], events: RunnerTaskEventPack[...
method onSpecsCollected (line 46) | onSpecsCollected(_specs, startTime) {
method onFinished (line 49) | onFinished(_files, errors, _coverage, executionTime) {
method onFinishedReportCoverage (line 58) | onFinishedReportCoverage() {
function findById (line 80) | function findById(id: string) {
function runAll (line 89) | function runAll() {
function clearTaskResult (line 93) | function clearTaskResult(task: RunnerTask) {
function clearResults (line 109) | function clearResults(useFiles: RunnerTestFile[]) {
function runFiles (line 136) | function runFiles(useFiles: RunnerTestFile[]) {
function runTask (line 144) | function runTask(task: RunnerTask) {
function runCurrent (line 152) | function runCurrent() {
FILE: packages/ui/client/composables/client/static.ts
type HTMLReportMetadata (line 15) | interface HTMLReportMetadata {
function createStaticClient (line 29) | function createStaticClient(): VitestClient {
FILE: packages/ui/client/composables/codemirror.ts
function useCodeMirror (line 22) | function useCodeMirror(
function showTaskSource (line 67) | async function showTaskSource(task: Task) {
function showLocationSource (line 77) | function showLocationSource(fileId: string, location: { line: number; co...
function showAttachmentSource (line 87) | function showAttachmentSource(task: RunnerTestCase, location?: TestArtif...
FILE: packages/ui/client/composables/error.ts
type TaskResult (line 8) | interface TaskResult {
function isTestFile (line 13) | function isTestFile(name: string, fileName?: string) {
function openInEditor (line 17) | async function openInEditor(name: string, line: number, column: number) {
function createAnsiToHtmlFilter (line 22) | function createAnsiToHtmlFilter(dark: boolean) {
function isPrimitive (line 29) | function isPrimitive(value: unknown) {
function parseError (line 35) | function parseError(e: unknown) {
function createHtmlError (line 64) | function createHtmlError(filter: Convert, error: TestError) {
function mapLeveledTaskStacks (line 94) | function mapLeveledTaskStacks(dark: boolean, tasks: RunnerTask[]) {
FILE: packages/ui/client/composables/explorer/collapse.ts
function runCollapseNode (line 21) | function runCollapseNode(id: string) {
function runCollapseAllTask (line 52) | function runCollapseAllTask() {
function collapseAllNodes (line 63) | function collapseAllNodes(nodes: UITaskTreeNode[]) {
FILE: packages/ui/client/composables/explorer/collector.ts
function runLoadFiles (line 30) | function runLoadFiles(
function preparePendingTasks (line 50) | function preparePendingTasks(packs: TaskResultPack[]) {
function recordTestArtifact (line 71) | function recordTestArtifact(
function runCollect (line 95) | function runCollect(
function updateRunningTodoTests (line 139) | function updateRunningTodoTests() {
function traverseFiles (line 154) | function traverseFiles(collect: boolean) {
function traverseReceivedFiles (line 184) | function traverseReceivedFiles(collect: boolean) {
function doRunFilter (line 223) | function doRunFilter(
function refreshExplorer (line 262) | function refreshExplorer(search: SearchMatcher, filter: Filter, end: boo...
function createOrUpdateEntry (line 271) | function createOrUpdateEntry(tasks: Task[]) {
function resetCollectorInfo (line 284) | function resetCollectorInfo(summary: CollectorInfo) {
function collectData (line 304) | function collectData(
function collectTests (line 394) | function collectTests(file: File, search: SearchMatcher = () => true, fi...
function collectTestsTotalData (line 441) | function collectTestsTotalData(
FILE: packages/ui/client/composables/explorer/expand.ts
function runExpandNode (line 26) | function runExpandNode(
function runExpandAll (line 88) | function runExpandAll(
function expandNodesOnEndRun (line 103) | function expandNodesOnEndRun(
function expandAllNodes (line 119) | function expandAllNodes(nodes: UITaskTreeNode[], updateState: boolean) {
FILE: packages/ui/client/composables/explorer/filter.ts
function testMatcher (line 13) | function testMatcher(task: Task, search: SearchMatcher, filter: Filter) {
function runFilter (line 22) | function runFilter(
function expandCollapseNode (line 136) | function expandCollapseNode(
function matchState (line 222) | function matchState(task: Task, filter: Filter) {
function matchTask (line 250) | function matchTask(
function matcher (line 307) | function matcher(node: UITaskTreeNode, search: SearchMatcher, filter: Fi...
FILE: packages/ui/client/composables/explorer/search.ts
function useSearch (line 26) | function useSearch(
FILE: packages/ui/client/composables/explorer/state.ts
constant ALL_PROJECTS (line 18) | const ALL_PROJECTS = '__vitest_ui_all_projects__'
function createSafeFilter (line 64) | function createSafeFilter(
function escapeHtml (line 84) | function escapeHtml(str: string) {
FILE: packages/ui/client/composables/explorer/tree.ts
class ExplorerTree (line 20) | class ExplorerTree {
method constructor (line 25) | constructor(
method loadFiles (line 65) | loadFiles(remoteFiles: File[], projects: { name: string; color?: strin...
method startRun (line 83) | startRun() {
method recordTestArtifact (line 89) | recordTestArtifact(testId: string, artifact: TestArtifact) {
method resumeRun (line 99) | resumeRun(packs: TaskResultPack[], _events: RunnerTaskEventPack[]) {
method endRun (line 109) | endRun(executionTime = performance.now() - this.startTime) {
method runCollect (line 116) | private runCollect() {
method collect (line 120) | private collect(start: boolean, end: boolean, task = true) {
method collectTestsTotal (line 157) | collectTestsTotal(
method collapseNode (line 172) | collapseNode(id: string) {
method expandNode (line 178) | expandNode(id: string) {
method collapseAllNodes (line 190) | collapseAllNodes() {
method expandAllNodes (line 196) | expandAllNodes() {
method filterNodes (line 208) | filterNodes() {
FILE: packages/ui/client/composables/explorer/types.ts
type FilterResult (line 3) | type FilterResult = [match: boolean, node: UITaskTreeNode]
type FilteredTests (line 5) | interface FilteredTests {
type SearchMatcher (line 12) | interface SearchMatcher {
type CollectFilteredTests (line 16) | interface CollectFilteredTests extends FilteredTests {
type TaskTreeNode (line 24) | interface TaskTreeNode {
type RootTreeNode (line 30) | interface RootTreeNode extends TaskTreeNode {
type TaskTreeNodeType (line 34) | type TaskTreeNodeType = 'file' | 'suite' | 'test'
type UITaskTreeNode (line 36) | interface UITaskTreeNode extends TaskTreeNode {
type TestTreeNode (line 47) | interface TestTreeNode extends UITaskTreeNode {
type ParentTreeNode (line 52) | interface ParentTreeNode extends UITaskTreeNode {
type SuiteTreeNode (line 57) | interface SuiteTreeNode extends ParentTreeNode {
type FileTreeNode (line 62) | interface FileTreeNode extends ParentTreeNode {
type Filter (line 74) | interface Filter {
type ProjectSortType (line 82) | type ProjectSortType = 'asc' | 'desc'
type DurationSortType (line 83) | type DurationSortType = 'duration-asc' | 'duration-desc'
type SortType (line 84) | type SortType = ProjectSortType | DurationSortType
type SortUIType (line 85) | type SortUIType = SortType | 'default'
type ProjectSortUIType (line 90) | type ProjectSortUIType = SortUIType
type TreeFilterState (line 92) | interface TreeFilterState extends Filter {
type CollectorInfo (line 99) | interface CollectorInfo {
FILE: packages/ui/client/composables/explorer/utils.ts
function isTestNode (line 16) | function isTestNode(node: UITaskTreeNode): node is TestTreeNode {
function isRunningTestNode (line 20) | function isRunningTestNode(node: UITaskTreeNode): node is TestTreeNode {
function isFileNode (line 24) | function isFileNode(node: UITaskTreeNode): node is FileTreeNode {
function isSuiteNode (line 28) | function isSuiteNode(node: UITaskTreeNode): node is SuiteTreeNode {
function isParentNode (line 32) | function isParentNode(node: UITaskTreeNode): node is FileTreeNode | Suit...
function isSlowTestTask (line 36) | function isSlowTestTask(task: Task) {
function getSortedRootTasks (line 50) | function getSortedRootTasks(sort: SortUIType, tasks = explorerTree.root....
function createOrUpdateFileNode (line 79) | function createOrUpdateFileNode(
function createOrUpdateSuiteTask (line 131) | function createOrUpdateSuiteTask(
function createOrUpdateNodeTask (line 152) | function createOrUpdateNodeTask(id: string) {
function createOrUpdateNode (line 167) | function createOrUpdateNode(
FILE: packages/ui/client/composables/location.ts
function openLocation (line 6) | function openLocation(test: RunnerTestCase, location?: TestArtifactLocat...
function getLocationString (line 10) | function getLocationString(location: TestArtifactLocation) {
FILE: packages/ui/client/composables/module-graph.ts
type ModuleType (line 13) | type ModuleType = 'external' | 'inline'
type ModuleNode (line 14) | type ModuleNode = GraphNode<ModuleType>
type ModuleLink (line 15) | type ModuleLink = GraphLink<ModuleType, ModuleNode>
type ModuleGraph (line 16) | type ModuleGraph = Graph<ModuleType, ModuleNode, ModuleLink>
type ModuleGraphController (line 17) | type ModuleGraphController = GraphController<
type ModuleGraphConfig (line 22) | type ModuleGraphConfig = GraphConfig<ModuleType, ModuleNode, ModuleLink>
function defineExternalModuleNodes (line 24) | function defineExternalModuleNodes(modules: string[]): ModuleNode[] {
function defineInlineModuleNode (line 46) | function defineInlineModuleNode(module: string, isRoot: boolean): Module...
function getModuleGraph (line 60) | function getModuleGraph(
FILE: packages/ui/client/composables/navigation.ts
function hideDetailsPanel (line 53) | function hideDetailsPanel() {
function showDetailsPanel (line 59) | function showDetailsPanel() {
function initializeNavigation (line 82) | function initializeNavigation() {
function showDashboard (line 106) | function showDashboard(show: boolean) {
function navigateTo (line 115) | function navigateTo({ file, line, view, test, column }: Params) {
function clickOnTask (line 125) | function clickOnTask(task: Task) {
function showCoverage (line 151) | function showCoverage() {
function calculateBrowserPanel (line 158) | function calculateBrowserPanel() {
function showNavigationPanel (line 170) | function showNavigationPanel() {
function updateBrowserPanel (line 176) | function updateBrowserPanel() {
function toggleDetailsPosition (line 192) | function toggleDetailsPosition() {
FILE: packages/ui/client/composables/params.ts
type Params (line 3) | interface Params {
FILE: packages/ui/client/composables/small-tabs.ts
type SmallTabsConfig (line 3) | interface SmallTabsConfig {
type SmallTabsContext (line 8) | interface SmallTabsContext {
constant SMALL_TABS_CONTEXT (line 15) | const SMALL_TABS_CONTEXT: InjectionKey<SmallTabsContext> = Symbol('tabCo...
FILE: packages/ui/client/constants.ts
constant PORT (line 1) | const PORT = import.meta.hot ? (import.meta.env.VITE_PORT || '51204') : ...
constant HOST (line 2) | const HOST = [location.hostname, PORT].filter(Boolean).join(':')
constant ENTRY_URL (line 3) | const ENTRY_URL = `${
constant BASE_PATH (line 7) | const BASE_PATH = isReport ? import.meta.env.BASE_URL : __BASE_PATH__
FILE: packages/ui/client/global-setup.ts
function createRouter (line 26) | function createRouter() {
FILE: packages/ui/client/shim.d.ts
type Window (line 6) | interface Window {
type Error (line 10) | interface Error {
FILE: packages/ui/client/test.ts
function render (line 9) | function render<C>(component: C, options?: ComponentRenderOptions<C, any...
FILE: packages/ui/client/utils/escape.ts
function escapeHtml (line 1) | function escapeHtml(unsafe: string) {
FILE: packages/ui/client/utils/task.ts
function isSuite (line 4) | function isSuite(task: RunnerTask): task is RunnerTestSuite {
function isTaskDone (line 8) | function isTaskDone(task: RunnerTask) {
function caseInsensitiveMatch (line 15) | function caseInsensitiveMatch(target: string, str2: string) {
function formatTime (line 22) | function formatTime(time: number): string {
function formatPreciseTime (line 29) | function formatPreciseTime(time: number): string {
type ModuleLabelItem (line 36) | interface ModuleLabelItem {
function calcExternalLabels (line 45) | function calcExternalLabels(
function createModuleLabelItem (line 99) | function createModuleLabelItem(module: string): ModuleLabelItem {
function getExternalModuleName (line 115) | function getExternalModuleName(module: string) {
function getImportDurationType (line 120) | function getImportDurationType(duration: number) {
function getDurationClass (line 129) | function getDurationClass(duration: number) {
function getBadgeNameColor (line 139) | function getBadgeNameColor(name: string | undefined, transparent = false) {
function getBadgeTextColor (line 155) | function getBadgeTextColor(color: string) {
FILE: packages/ui/node/index.ts
method handler (line 27) | handler(server) {
FILE: packages/ui/node/reporter.ts
type PotentialConfig (line 13) | interface PotentialConfig {
function getOutputFile (line 17) | function getOutputFile(config: PotentialConfig | undefined) {
type HTMLReportData (line 29) | interface HTMLReportData {
class HTMLReporter (line 42) | class HTMLReporter implements Reporter {
method constructor (line 50) | constructor(options: HTMLOptions) {
method onInit (line 54) | async onInit(ctx: Vitest): Promise<void> {
method onTestRunEnd (line 68) | async onTestRunEnd(): Promise<void> {
method writeReport (line 107) | async writeReport(report: string): Promise<void> {
method onFinishedReportCoverage (line 158) | async onFinishedReportCoverage(): Promise<void> {
FILE: packages/ui/rollup.config.js
function onwarn (line 69) | function onwarn(message) {
FILE: packages/ui/types.ts
type WSMessage (line 3) | interface WSMessage {
type RunState (line 15) | type RunState = 'idle' | 'running'
type BrowserRunnerState (line 17) | interface BrowserRunnerState {
FILE: packages/ui/vite.config.ts
method transformIndexHtml (line 82) | transformIndexHtml(html) {
FILE: packages/utils/rollup.config.js
function onwarn (line 83) | function onwarn(message) {
FILE: packages/utils/src/constants.ts
constant KNOWN_ASSET_TYPES (line 3) | const KNOWN_ASSET_TYPES: string[] = [
constant KNOWN_ASSET_RE (line 39) | const KNOWN_ASSET_RE: RegExp = new RegExp(
constant CSS_LANGS_RE (line 42) | const CSS_LANGS_RE: RegExp
constant VALID_ID_PREFIX (line 47) | const VALID_ID_PREFIX = `/@id/`
constant NULL_BYTE_PLACEHOLDER (line 60) | const NULL_BYTE_PLACEHOLDER = `__x00__`
FILE: packages/utils/src/diff/cleanupSemantic.ts
constant DIFF_DELETE (line 40) | const DIFF_DELETE = -1
constant DIFF_INSERT (line 41) | const DIFF_INSERT = 1
constant DIFF_EQUAL (line 42) | const DIFF_EQUAL = 0
class Diff (line 51) | class Diff {
method constructor (line 55) | constructor(op: number, text: string) {
function diff_commonPrefix (line 68) | function diff_commonPrefix(text1: string, text2: string): number {
function diff_commonSuffix (line 102) | function diff_commonSuffix(text1: string, text2: string): number {
function diff_commonOverlap_ (line 142) | function diff_commonOverlap_(text1: string, text2: string): number {
function diff_cleanupSemantic (line 192) | function diff_cleanupSemantic(diffs: Array<Diff>): void {
function diff_cleanupSemanticLossless (line 340) | function diff_cleanupSemanticLossless(diffs: Array<Diff>) {
function diff_cleanupMerge (line 413) | function diff_cleanupMerge(diffs: Array<Diff>) {
function diff_cleanupSemanticScore_ (line 567) | function diff_cleanupSemanticScore_(one: string, two: string): number {
FILE: packages/utils/src/diff/constants.ts
constant NO_DIFF_MESSAGE (line 8) | const NO_DIFF_MESSAGE: string = 'Compared values have no visual differen...
constant SIMILAR_MESSAGE (line 10) | const SIMILAR_MESSAGE: string
FILE: packages/utils/src/diff/diffLines.ts
function isEmptyString (line 17) | function isEmptyString(lines: Array<string>) {
type ChangeCounts (line 21) | interface ChangeCounts {
function countChanges (line 26) | function countChanges(diffs: Array<Diff>): ChangeCounts {
function printAnnotation (line 45) | function printAnnotation(
function printDiffLines (line 88) | function printDiffLines(
function diffLinesUnified (line 105) | function diffLinesUnified(
function diffLinesUnified2 (line 122) | function diffLinesUnified2(
function diffLinesRaw (line 178) | function diffLinesRaw(
FILE: packages/utils/src/diff/diffStrings.ts
function getNewLineSymbol (line 13) | function getNewLineSymbol(string: string) {
function diffStrings (line 17) | function diffStrings(
FILE: packages/utils/src/diff/getAlignedDiffs.ts
function concatenateRelevantDiffs (line 15) | function concatenateRelevantDiffs(
class ChangeBuffer (line 33) | class ChangeBuffer {
method constructor (line 39) | constructor(op: number, changeColor: DiffOptionsColor) {
method pushSubstring (line 46) | private pushSubstring(substring: string): void {
method pushLine (line 50) | private pushLine(): void {
method isLineEmpty (line 70) | isLineEmpty() {
method pushDiff (line 75) | pushDiff(diff: Diff): void {
method align (line 80) | align(diff: Diff): void {
method moveLinesTo (line 108) | moveLinesTo(lines: Array<Diff>): void {
class CommonBuffer (line 119) | class CommonBuffer {
method constructor (line 124) | constructor(deleteBuffer: ChangeBuffer, insertBuffer: ChangeBuffer) {
method pushDiffCommonLine (line 130) | private pushDiffCommonLine(diff: Diff): void {
method pushDiffChangeLines (line 134) | private pushDiffChangeLines(diff: Diff): void {
method flushChangeLines (line 147) | private flushChangeLines(): void {
method align (line 153) | align(diff: Diff): void {
method getLines (line 200) | getLines(): Array<Diff> {
function getAlignedDiffs (line 216) | function getAlignedDiffs(
FILE: packages/utils/src/diff/getType.ts
type ValueType (line 1) | type ValueType
function getType (line 19) | function getType(value: unknown): ValueType {
FILE: packages/utils/src/diff/index.ts
function getCommonMessage (line 32) | function getCommonMessage(message: string, options?: DiffOptions) {
constant PLUGINS (line 46) | const PLUGINS = [
constant FORMAT_OPTIONS (line 55) | const FORMAT_OPTIONS = {
constant FALLBACK_FORMAT_OPTIONS (line 59) | const FALLBACK_FORMAT_OPTIONS = {
function diff (line 74) | function diff(a: any, b: any, options?: DiffOptions): string | undefined {
function comparePrimitive (line 137) | function comparePrimitive(
function sortMap (line 149) | function sortMap(map: Map<unknown, unknown>) {
function sortSet (line 153) | function sortSet(set: Set<unknown>) {
function compareObjects (line 157) | function compareObjects(
function getFormatOptions (line 191) | function getFormatOptions(
function getObjectsDifference (line 205) | function getObjectsDifference(
constant MAX_DIFF_STRING_LENGTH (line 232) | const MAX_DIFF_STRING_LENGTH = 20_000
function isAsymmetricMatcher (line 234) | function isAsymmetricMatcher(data: any) {
function isReplaceable (line 239) | function isReplaceable(obj1: any, obj2: any) {
function printDiffOrStringify (line 247) | function printDiffOrStringify(
function replaceAsymmetricMatcher (line 305) | function replaceAsymmetricMatcher(
type PrintLabel (line 389) | type PrintLabel = (string: string) => string
function getLabelPrinter (line 390) | function getLabelPrinter(...strings: Array<string>): PrintLabel {
constant SPACE_SYMBOL (line 399) | const SPACE_SYMBOL = '\u{00B7}' // middle dot
function replaceTrailingSpaces (line 400) | function replaceTrailingSpaces(text: string): string {
function printReceived (line 404) | function printReceived(object: unknown): string {
function printExpected (line 407) | function printExpected(value: unknown): string {
function getCommonAndChangedSubstrings (line 411) | function getCommonAndChangedSubstrings(diffs: Array<Diff>, op: number, h...
FILE: packages/utils/src/diff/joinAlignedDiffs.ts
function formatTrailingSpaces (line 12) | function formatTrailingSpaces(
function printDiffLine (line 19) | function printDiffLine(
function printDeleteLine (line 38) | function printDeleteLine(
function printInsertLine (line 58) | function printInsertLine(
function printCommonLine (line 78) | function printCommonLine(
function createPatchMark (line 99) | function createPatchMark(
function joinAlignedDiffsNoExpand (line 115) | function joinAlignedDiffsNoExpand(
function joinAlignedDiffsExpand (line 299) | function joinAlignedDiffsExpand(
FILE: packages/utils/src/diff/normalizeDiffOptions.ts
constant DIFF_CONTEXT_DEFAULT (line 14) | const DIFF_CONTEXT_DEFAULT = 5
constant DIFF_TRUNCATE_THRESHOLD_DEFAULT (line 15) | const DIFF_TRUNCATE_THRESHOLD_DEFAULT = 0 // not truncate
function getDefaultOptions (line 17) | function getDefaultOptions(): DiffOptionsNormalized {
function getCompareKeys (line 44) | function getCompareKeys(compareKeys?: CompareKeys): CompareKeys {
function getContextLines (line 50) | function getContextLines(contextLines?: number): number {
function normalizeDiffOptions (line 59) | function normalizeDiffOptions(
FILE: packages/utils/src/diff/printDiffs.ts
function hasCommonDiff (line 16) | function hasCommonDiff(diffs: Array<Diff>, isMultiline: boolean): boolean {
function diffStringsUnified (line 30) | function diffStringsUnified(
function diffStringsRaw (line 59) | function diffStringsRaw(
FILE: packages/utils/src/diff/types.ts
type DiffOptionsColor (line 9) | type DiffOptionsColor = (arg: string) => string
type DiffOptions (line 11) | interface DiffOptions {
type SerializedDiffOptions (line 37) | interface SerializedDiffOptions {
type DiffOptionsNormalized (line 54) | interface DiffOptionsNormalized {
FILE: packages/utils/src/display.ts
type Inspect (line 9) | type Inspect = (value: unknown, options: Options) => string
type Options (line 10) | interface Options {
type LoupeOptions (line 24) | type LoupeOptions = Partial<Options>
constant PLUGINS (line 35) | const PLUGINS = [
type StringifyOptions (line 44) | interface StringifyOptions extends PrettyFormatOptions {
function stringify (line 49) | function stringify(
function createNodeFilterFromSelector (line 99) | function createNodeFilterFromSelector(selector: string): (node: any) => ...
type FormatOptions (line 125) | interface FormatOptions {
function baseFormat (line 129) | function baseFormat(args: unknown[], options: FormatOptions = {}): string {
function format (line 236) | function format(...args: unknown[]): string {
function browserFormat (line 240) | function browserFormat(...args: unknown[]): string {
function inspect (line 244) | function inspect(obj: unknown, options: LoupeOptions = {}): string {
function objDisplay (line 251) | function objDisplay(obj: unknown, options: LoupeOptions = {}): string {
FILE: packages/utils/src/error.ts
function processError (line 9) | function processError(
FILE: packages/utils/src/helpers.ts
type CloneOptions (line 4) | interface CloneOptions {
type ErrorOptions (line 8) | interface ErrorOptions {
function createSimpleStackTrace (line 21) | function createSimpleStackTrace(options?: ErrorOptions): string {
function notNullish (line 35) | function notNullish<T>(v: T | null | undefined): v is NonNullable<T> {
function assertTypes (line 39) | function assertTypes(
function isPrimitive (line 53) | function isPrimitive(value: unknown): boolean {
function slash (line 59) | function slash(path: string): string {
function cleanUrl (line 64) | function cleanUrl(url: string): string {
function wrapId (line 76) | function wrapId(id: string): string {
function unwrapId (line 85) | function unwrapId(id: string): string {
function withTrailingSlash (line 91) | function withTrailingSlash(path: string): string {
function filterOutComments (line 98) | function filterOutComments(s: string): string {
function isBareImport (line 130) | function isBareImport(id: string): boolean {
function toArray (line 134) | function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T> {
function isObject (line 146) | function isObject(item: unknown): boolean {
function isFinalObj (line 150) | function isFinalObj(obj: any) {
function getType (line 158) | function getType(value: unknown): string {
function collectOwnProperties (line 162) | function collectOwnProperties(
function getOwnProperties (line 174) | function getOwnProperties(obj: any): (string | symbol)[] {
function deepClone (line 185) | function deepClone<T>(
function clone (line 193) | function clone<T>(
function noop (line 251) | function noop(): void {}
function objectAttr (line 253) | function objectAttr(
type DeferPromise (line 270) | type DeferPromise<T> = Promise<T> & {
function createDefer (line 275) | function createDefer<T>(): DeferPromise<T> {
function getCallLastIndex (line 298) | function getCallLastIndex(code: string): number | null {
function isNegativeNaN (line 336) | function isNegativeNaN(val: number): boolean {
function toString (line 348) | function toString(v: any) {
function isPlainObject (line 352) | function isPlainObject(val: any): val is object {
function isMergeableObject (line 359) | function isMergeableObject(item: any): item is object {
function ordinal (line 363) | function ordinal(i: number): string {
function deepMerge (line 389) | function deepMerge<T extends object = object>(
function unique (line 421) | function unique<T>(array: T[]): T[] {
FILE: packages/utils/src/nanoid.ts
function nanoid (line 5) | function nanoid(size = 21): string {
FILE: packages/utils/src/offset.ts
function positionToOffset (line 3) | function positionToOffset(
function offsetToLineNumber (line 23) | function offsetToLineNumber(source: string, offset: number): number {
FILE: packages/utils/src/random.ts
function random (line 3) | function random(seed: number) {
function shuffle (line 8) | function shuffle<T>(array: T[], seed: number = RealDate.now()): T[] {
FILE: packages/utils/src/resolver.ts
function findNearestPackageData (line 6) | function findNearestPackageData(
function stripBomTag (line 37) | function stripBomTag(content: string): string {
function tryStatSync (line 45) | function tryStatSync(file: string): fs.Stats | undefined {
function getCachedData (line 55) | function getCachedData<T>(
function setCacheData (line 69) | function setCacheData<T>(
function getFnpdCacheKey (line 81) | function getFnpdCacheKey(basedir: string) {
function traverseBetweenDirs (line 90) | function traverseBetweenDirs(
FILE: packages/utils/src/serialize.ts
class Element (line 2) | class Element {
constant IS_RECORD_SYMBOL (line 6) | const IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@'
constant IS_COLLECTION_SYMBOL (line 7) | const IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@'
function isImmutable (line 9) | function isImmutable(v: any) {
constant OBJECT_PROTO (line 13) | const OBJECT_PROTO = Object.getPrototypeOf({})
function getUnserializableMessage (line 15) | function getUnserializableMessage(err: unknown) {
function serializeValue (line 26) | function serializeValue(val: any, seen: WeakMap<WeakKey, any> = new Weak...
function safe (line 129) | function safe(fn: () => void) {
function normalizeErrorMessage (line 138) | function normalizeErrorMessage(message: string) {
FILE: packages/utils/src/source-map.ts
type StackTraceParserOptions (line 7) | interface StackTraceParserOptions {
constant CHROME_IE_STACK_REGEXP (line 14) | const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m
constant SAFARI_NATIVE_CODE_REGEXP (line 15) | const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/
constant NOW_LENGTH (line 44) | const NOW_LENGTH = Date.now().toString().length
constant REGEXP_VITEST (line 45) | const REGEXP_VITEST = new RegExp(`vitest=\\d{${NOW_LENGTH}}`)
function extractLocation (line 47) | function extractLocation(urlLike: string) {
function parseSingleFFOrSafariStack (line 78) | function parseSingleFFOrSafariStack(raw: string): ParsedStack | null {
function parseSingleStack (line 137) | function parseSingleStack(raw: string): ParsedStack | null {
function parseSingleV8Stack (line 147) | function parseSingleV8Stack(raw: string): ParsedStack | null {
function createStackString (line 216) | function createStackString(stacks: ParsedStack[]): string {
function parseStacktrace (line 226) | function parseStacktrace(
function shouldFilter (line 282) | function shouldFilter(ignoreStackEntries: (string | RegExp)[], file: str...
function parseFFOrSafariStackTrace (line 286) | function parseFFOrSafariStackTrace(stack: string): ParsedStack[] {
function parseV8Stacktrace (line 293) | function parseV8Stacktrace(stack: string): ParsedStack[] {
function parseErrorStacktrace (line 300) | function parseErrorStacktrace(
type SourceMapLike (line 339) | interface SourceMapLike {
type Needle (line 348) | interface Needle {
class DecodedMap (line 353) | class DecodedMap {
method constructor (line 362) | constructor(
type Stats (line 378) | interface Stats {
function memoizedState (line 384) | function memoizedState(): Stats {
function getOriginalPosition (line 392) | function getOriginalPosition(
FILE: packages/utils/src/source-map/node.ts
type ExtractedSourceMap (line 5) | interface ExtractedSourceMap {
function extractSourcemapFromFile (line 11) | function extractSourcemapFromFile(
function createConvertSourceMapReadMap (line 25) | function createConvertSourceMapReadMap(originalFileName: string) {
FILE: packages/utils/src/timers.ts
constant SAFE_TIMERS_SYMBOL (line 1) | const SAFE_TIMERS_SYMBOL = Symbol('vitest:SAFE_TIMERS')
type SafeTimers (line 3) | interface SafeTimers {
function getSafeTimers (line 23) | function getSafeTimers(): SafeTimers {
function setSafeTimers (line 49) | function setSafeTimers(): void {
function delay (line 90) | function delay(timeout: number, scheduler: typeof setTimeout = setTimeou...
FILE: packages/utils/src/types.ts
type Awaitable (line 1) | type Awaitable<T> = T | PromiseLike<T>
type Nullable (line 2) | type Nullable<T> = T | null | undefined
type Arrayable (line 3) | type Arrayable<T> = T | Array<T>
type ArgumentsType (line 4) | type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never
type MergeInsertions (line 6) | type MergeInsertions<T> = T extends object
type DeepMerge (line 10) | type DeepMerge<F, S> = MergeInsertions<{
type Constructable (line 20) | interface Constructable {
type ParsedStack (line 24) | interface ParsedStack {
type SerializedError (line 31) | interface SerializedError {
type TestError (line 40) | interface TestError extends SerializedError {
FILE: packages/vitest/importMeta.d.ts
type ImportMeta (line 1) | interface ImportMeta {
FILE: packages/vitest/rollup.config.js
function licensePlugin (line 175) | function licensePlugin() {
function onwarn (line 269) | function onwarn(message) {
function sortLicenses (line 276) | function sortLicenses(licenses) {
FILE: packages/vitest/src/api/check.ts
function isValidApiRequest (line 5) | function isValidApiRequest(config: ResolvedConfig, req: IncomingMessage)...
FILE: packages/vitest/src/api/setup.ts
function setup (line 31) | function setup(ctx: Vitest, _server?: ViteDevServer): void {
class WebSocketReporter (line 216) | class WebSocketReporter implements Reporter {
method constructor (line 219) | constructor(
method onTestModuleCollected (line 225) | onTestModuleCollected(testModule: TestModule): void {
method onTestRunStart (line 235) | onTestRunStart(specifications: ReadonlyArray<TestSpecification>): void {
method onTestCaseAnnotate (line 247) | async onTestCaseAnnotate(testCase: TestCase, annotation: TestAnnotatio...
method onTestCaseArtifactRecord (line 257) | async onTestCaseArtifactRecord(testCase: TestCase, artifact: TestArtif...
method onTaskUpdate (line 267) | async onTaskUpdate(packs: TaskResultPack[], events: TaskEventPack[]): ...
method sum (line 277) | private sum<T>(items: T[], cb: (_next: T) => number | undefined) {
method onTestRunEnd (line 283) | onTestRunEnd(testModules: ReadonlyArray<TestModule>, unhandledErrors: ...
method onFinishedReportCoverage (line 301) | onFinishedReportCoverage(): void {
method onUserConsoleLog (line 307) | onUserConsoleLog(log: UserConsoleLog): void {
FILE: packages/vitest/src/api/types.ts
type SourceMap (line 9) | interface SourceMap {
type ExternalResult (line 20) | interface ExternalResult {
type TransformResultWithSource (line 24) | interface TransformResultWithSource {
type WebSocketHandlers (line 38) | interface WebSocketHandlers {
type WebSocketEvents (line 67) | interface WebSocketEvents {
type WebSocketRPC (line 84) | type WebSocketRPC = BirpcReturn<WebSocketEvents, WebSocketHandlers>
FILE: packages/vitest/src/constants.ts
constant API_PATH (line 6) | const API_PATH = '/__vitest_api__'
constant CONFIG_NAMES (line 8) | const CONFIG_NAMES: string[] = ['vitest.config', 'vite.config']
constant CONFIG_EXTENSIONS (line 10) | const CONFIG_EXTENSIONS: string[] = ['.ts', '.mts', '.cts', '.js', '.mjs...
FILE: packages/vitest/src/create/browser/creator.ts
function getProviderOptions (line 17) | function getProviderOptions(): prompt.Choice[] {
function getBrowserNames (line 33) | function getBrowserNames(provider: BrowserBuiltinProvider) {
function getFramework (line 44) | function getFramework(): prompt.Choice[] {
function getFrameworkTestPackage (line 94) | function getFrameworkTestPackage(framework: string) {
function getFrameworkPluginPackage (line 118) | function getFrameworkPluginPackage(framework: string) {
function getLanguageOptions (line 138) | function getLanguageOptions(): prompt.Choice[] {
function installPackages (line 153) | async function installPackages(pkgManager: string | null, packages: stri...
function readPkgJson (line 166) | function readPkgJson(path: string) {
function getPossibleDefaults (line 174) | function getPossibleDefaults(dependencies: any) {
function getPossibleFramework (line 184) | function getPossibleFramework(dependencies: Record<string, string>) {
function getPossibleProvider (line 212) | function getPossibleProvider(dependencies: Record<string, string>) {
function getProviderDocsLink (line 220) | function getProviderDocsLink(provider: string) {
function sort (line 229) | function sort(choices: prompt.Choice[], value: string | undefined) {
function fail (line 238) | function fail() {
function getFrameworkImportInfo (line 242) | function getFrameworkImportInfo(framework: string) {
function generateFrameworkConfigFile (line 253) | async function generateFrameworkConfigFile(options: {
function updatePkgJsonScripts (line 289) | async function updatePkgJsonScripts(pkgJsonPath: string, vitestScript: s...
function getRunScript (line 307) | function getRunScript(pkgManager: Agent | null) {
function getPlaywrightRunArgs (line 322) | function getPlaywrightRunArgs(pkgManager: Agent | null) {
function create (line 337) | async function create(): Promise<void> {
FILE: packages/vitest/src/create/browser/examples.ts
function getExampleTest (line 301) | function getExampleTest(framework: string) {
function generateExampleFiles (line 330) | async function generateExampleFiles(framework: string, lang: 'ts' | 'js'...
FILE: packages/vitest/src/integrations/chai/config.ts
function setupChaiConfig (line 3) | function setupChaiConfig(config: ChaiConfig): void {
type ChaiConfig (line 7) | type ChaiConfig = Omit<
FILE: packages/vitest/src/integrations/chai/index.ts
function createExpect (line 17) | function createExpect(test?: Test | TaskPopulated): ExpectStatic {
FILE: packages/vitest/src/integrations/chai/poll.ts
function throwWithCause (line 37) | function throwWithCause(error: any, source: Error) {
function createExpectPoll (line 48) | function createExpectPoll(expect: ExpectStatic): ExpectStatic['poll'] {
function copyStackTrace (line 171) | function copyStackTrace(target: Error, source: Error) {
FILE: packages/vitest/src/integrations/coverage.ts
function startCoverageInsideWorker (line 5) | async function startCoverageInsideWorker(
function takeCoverageInsideWorker (line 19) | async function takeCoverageInsideWorker(
function stopCoverageInsideWorker (line 32) | async function stopCoverageInsideWorker(
FILE: packages/vitest/src/integrations/css/css-modules.ts
function generateCssFilenameHash (line 4) | function generateCssFilenameHash(filepath: string): string {
function generateScopedClassName (line 8) | function generateScopedClassName(
FILE: packages/vitest/src/integrations/env/edge-runtime.ts
method setupVM (line 8) | async setupVM() {
method setup (line 26) | async setup(global) {
FILE: packages/vitest/src/integrations/env/happy-dom.ts
function teardownWindow (line 4) | async function teardownWindow(win: {
method setupVM (line 20) | async setupVM({ happyDOM = {} }) {
method setup (line 50) | async setup(global, { happyDOM = {} }) {
FILE: packages/vitest/src/integrations/env/jsdom-keys.ts
constant LIVING_KEYS (line 3) | const LIVING_KEYS = [
constant OTHER_KEYS (line 190) | const OTHER_KEYS = [
constant KEYS (line 253) | const KEYS: string[] = LIVING_KEYS.concat(OTHER_KEYS)
FILE: packages/vitest/src/integrations/env/jsdom.ts
function catchWindowErrors (line 7) | function catchWindowErrors(window: DOMWindow) {
method setupVM (line 46) | async setupVM({ jsdom = {} }) {
method setup (line 159) | async setup(global, { jsdom = {} }) {
function createCompatRequest (line 234) | function createCompatRequest(utils: CompatUtils) {
function createJSDOMCompatURL (line 260) | function createJSDOMCompatURL(utils: CompatUtils): typeof URL {
type CompatUtils (line 277) | interface CompatUtils {
function createCompatUtils (line 283) | function createCompatUtils(window: DOMWindow): CompatUtils {
function patchAddEventListener (line 311) | function patchAddEventListener(window: DOMWindow) {
FILE: packages/vitest/src/integrations/env/loader.ts
function isBuiltinEnvironment (line 13) | function isBuiltinEnvironment(
function createEnvironmentLoader (line 22) | function createEnvironmentLoader(root: string, rpc: WorkerRPC): ModuleRu...
function loadNativeEnvironment (line 57) | async function loadNativeEnvironment(
function resolveEnvironmentFromModule (line 72) | function resolveEnvironmentFromModule(name: string, packageId: string, p...
function loadEnvironment (line 100) | async function loadEnvironment(
FILE: packages/vitest/src/integrations/env/node.ts
function populateNodeGlobals (line 16) | function populateNodeGlobals() {
method setupVM (line 45) | async setupVM() {
method setup (line 123) | async setup(global) {
FILE: packages/vitest/src/integrations/env/utils.ts
function getWindowKeys (line 5) | function getWindowKeys(
function isClassLikeName (line 27) | function isClassLikeName(name: string) {
type PopulateOptions (line 31) | interface PopulateOptions {
function populateGlobal (line 41) | function populateGlobal(
FILE: packages/vitest/src/integrations/globals.ts
function registerApiGlobally (line 4) | function registerApiGlobally(): void {
FILE: packages/vitest/src/integrations/inject.ts
function inject (line 8) | function inject<T extends keyof ProvidedContext & string>(
FILE: packages/vitest/src/integrations/mock/date.ts
class MockDate (line 30) | class MockDate extends RealDate {
method constructor (line 42) | constructor(
function mockDate (line 96) | function mockDate(date: string | number | Date): void {
function resetDate (line 108) | function resetDate(): void {
FILE: packages/vitest/src/integrations/mock/timers.ts
class FakeTimers (line 17) | class FakeTimers {
method constructor (line 32) | constructor({
method clearAllTimers (line 48) | clearAllTimers(): void {
method dispose (line 54) | dispose(): void {
method runAllTimers (line 58) | runAllTimers(): void {
method runAllTimersAsync (line 64) | async runAllTimersAsync(): Promise<void> {
method runOnlyPendingTimers (line 70) | runOnlyPendingTimers(): void {
method runOnlyPendingTimersAsync (line 76) | async runOnlyPendingTimersAsync(): Promise<void> {
method advanceTimersToNextTimer (line 82) | advanceTimersToNextTimer(steps = 1): void {
method advanceTimersToNextTimerAsync (line 96) | async advanceTimersToNextTimerAsync(steps = 1): Promise<void> {
method advanceTimersByTime (line 110) | advanceTimersByTime(msToRun: number): void {
method advanceTimersByTimeAsync (line 116) | async advanceTimersByTimeAsync(msToRun: number): Promise<void> {
method advanceTimersToNextFrame (line 122) | advanceTimersToNextFrame(): void {
method runAllTicks (line 128) | runAllTicks(): void {
method useRealTimers (line 134) | useRealTimers(): void {
method useFakeTimers (line 146) | useFakeTimers(): void {
method reset (line 179) | reset(): void {
method setSystemTime (line 187) | setSystemTime(now?: string | number | Date): void {
method getMockedSystemTime (line 198) | getMockedSystemTime(): Date | null {
method getRealSystemTime (line 202) | getRealSystemTime(): number {
method getTimerCount (line 206) | getTimerCount(): number {
method setTimerTickMode (line 214) | setTimerTickMode(mode: 'manual' | 'nextTimerAsync' | 'interval', inter...
method configure (line 231) | configure(config: FakeTimerInstallOpts): void {
method isFakeTimers (line 235) | isFakeTimers(): boolean {
method _checkFakeTimers (line 239) | private _checkFakeTimers() {
FILE: packages/vitest/src/integrations/snapshot/chai.ts
function getSnapshotClient (line 13) | function getSnapshotClient(): SnapshotClient {
function getError (line 24) | function getError(expected: () => void | Error, promise: string | undefi...
function getTestNames (line 46) | function getTestNames(test: Test) {
function getTest (line 55) | function getTest(assertionName: string, obj: object) {
FILE: packages/vitest/src/integrations/snapshot/environments/node.ts
class VitestNodeSnapshotEnvironment (line 4) | class VitestNodeSnapshotEnvironment extends NodeSnapshotEnvironment {
method getHeader (line 5) | getHeader(): string {
method resolvePath (line 9) | resolvePath(filepath: string): Promise<string> {
FILE: packages/vitest/src/integrations/snapshot/environments/resolveSnapshotEnvironment.ts
function resolveSnapshotEnvironment (line 5) | async function resolveSnapshotEnvironment(
FILE: packages/vitest/src/integrations/vi.ts
type ESModuleExports (line 19) | type ESModuleExports = Record<string, unknown>
type VitestUtils (line 21) | interface VitestUtils {
function createVitest (line 476) | function createVitest(): VitestUtils {
function _mocker (line 833) | function _mocker(): VitestMocker {
function getImporter (line 851) | function getImporter(name: string) {
FILE: packages/vitest/src/integrations/wait.ts
type WaitForCallback (line 6) | type WaitForCallback<T> = () => T | Promise<T>
type WaitForOptions (line 8) | interface WaitForOptions {
function copyStackTrace (line 21) | function copyStackTrace(target: Error, source: Error) {
function waitFor (line 28) | function waitFor<T>(
type WaitUntilCallback (line 117) | type WaitUntilCallback<T> = () => T | Promise<T>
type WaitUntilOptions (line 119) | interface WaitUntilOptions
type Truthy (line 122) | type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T
function waitUntil (line 124) | function waitUntil<T>(
FILE: packages/vitest/src/node/ast-collect.ts
type ParsedFile (line 23) | interface ParsedFile extends File {
type ParsedTest (line 28) | interface ParsedTest extends Test {
type ParsedSuite (line 34) | interface ParsedSuite extends Suite {
type LocalCallDefinition (line 40) | interface LocalCallDefinition {
function isTestFunctionName (line 56) | function isTestFunctionName(name: string) {
function isVitestFunctionName (line 60) | function isVitestFunctionName(name: string) {
function astParseFile (line 64) | function astParseFile(filepath: string, code: string) {
function createFailedFileTask (line 286) | function createFailedFileTask(project: TestProject, filepath: string, er...
function serializeError (line 311) | function serializeError(ctx: TestProject, error: any): TestError[] {
function createFileTask (line 333) | function createFileTask(
function astCollectTests (line 501) | async function astCollectTests(
function transformSSR (line 525) | async function transformSSR(project: TestProject, filepath: string) {
function markDynamicTests (line 541) | function markDynamicTests(tasks: Task[]) {
function escapeRegex (line 552) | function escapeRegex(str: string) {
function escapeTestName (line 567) | function escapeTestName(label: string, dynamic: boolean): string {
FILE: packages/vitest/src/node/browser/sessions.ts
class BrowserSessions (line 5) | class BrowserSessions {
method getSession (line 10) | getSession(sessionId: string): BrowserServerStateSession | undefined {
method destroySession (line 14) | destroySession(sessionId: string): void {
method createSession (line 18) | createSession(sessionId: string, project: TestProject, pool: { reject:...
FILE: packages/vitest/src/node/cache/files.ts
type FileStatsCache (line 6) | type FileStatsCache = Pick<Stats, 'size'>
class FilesStatsCache (line 8) | class FilesStatsCache {
method getStats (line 11) | public getStats(key: string): FileStatsCache | undefined {
method populateStats (line 15) | public async populateStats(root: string, specs: TestSpecification[]): ...
method updateStats (line 23) | public async updateStats(fsPath: string, key: string): Promise<void> {
method removeStats (line 31) | public removeStats(fsPath: string): void {
FILE: packages/vitest/src/node/cache/fsModuleCache.ts
constant METADATA_FILE (line 19) | const METADATA_FILE = '_metadata.json'
class FileSystemModuleCache (line 26) | class FileSystemModuleCache {
method constructor (line 48) | constructor(private vitest: Vitest) {
method defineCacheKeyGenerator (line 55) | public defineCacheKeyGenerator(callback: CacheKeyIdGenerator): void {
method clearCache (line 59) | async clearCache(log = true): Promise<void> {
method readCachedFileConcurrently (line 72) | private readCachedFileConcurrently(cachedFilePath: string) {
method getCachedModule (line 89) | async getCachedModule(cachedFilePath: string): Promise<
method saveCachedModule (line 116) | async saveCachedModule<T extends FetchResult>(
method toBase64 (line 135) | private toBase64(obj: unknown) {
method fromBase64 (line 140) | private fromBase64(obj: string) {
method invalidateCachePath (line 145) | invalidateCachePath(
method invalidateAllCachePaths (line 153) | invalidateAllCachePaths(environment: DevEnvironment): void {
method getMemoryCachePath (line 158) | getMemoryCachePath(
method generateCachePath (line 172) | generateCachePath(
method saveMemoryCache (line 260) | private saveMemoryCache(environment: DevEnvironment, id: string, cache...
method readMetadata (line 269) | private async readMetadata(): Promise<{ lockfileHash: string } | undef...
method ensureCacheIntegrity (line 285) | public async ensureCacheIntegrity(): Promise<void> {
function atomicWriteFile (line 344) | async function atomicWriteFile(realFilePath: string, data: string): Prom...
type CachedInlineModuleMeta (line 362) | interface CachedInlineModuleMeta {
type CacheKeyIdGenerator (line 377) | interface CacheKeyIdGenerator {
type CacheKeyIdGeneratorContext (line 384) | interface CacheKeyIdGeneratorContext {
function getLockfileHash (line 449) | function getLockfileHash(root: string): string {
function lookupFile (line 473) | function lookupFile(
function tryReadFileSync (line 493) | function tryReadFileSync(file: string): string {
function tryStatSync (line 502) | function tryStatSync(file: string): fs.Stats | undefined {
FILE: packages/vitest/src/node/cache/index.ts
class VitestCache (line 9) | class VitestCache {
method constructor (line 13) | constructor(logger: Logger) {
method getFileTestResults (line 17) | getFileTestResults(key: string): SuiteResultCache | undefined {
method getFileStats (line 21) | getFileStats(key: string): {
method resolveCacheDir (line 27) | static resolveCacheDir(root: string, dir?: string, projectName?: strin...
FILE: packages/vitest/src/node/cache/results.ts
type SuiteResultCache (line 9) | interface SuiteResultCache {
class ResultsCache (line 14) | class ResultsCache {
method constructor (line 21) | constructor(private logger: Logger) {
method getCachePath (line 25) | public getCachePath(): string | null {
method setConfig (line 29) | setConfig(root: string, config: ResolvedConfig['cache']): void {
method getResults (line 36) | getResults(key: string): SuiteResultCache | undefined {
method clearCache (line 40) | async clearCache(): Promise<void> {
method readFromCache (line 47) | async readFromCache(): Promise<void> {
method updateResults (line 72) | updateResults(files: File[]): void {
method removeFromCache (line 88) | removeFromCache(filepath: string): void {
method writeToCache (line 96) | async writeToCache(): Promise<void> {
FILE: packages/vitest/src/node/cli/cac.ts
function addCommand (line 13) | function addCommand(cli: CAC | Command, name: string, option: CLIOption<...
type CliParseOptions (line 64) | interface CliParseOptions {
function addCliOptions (line 68) | function addCliOptions(cli: CAC | Command, options: CLIOptionsConfig<any...
function createCLI (line 76) | function createCLI(options: CliParseOptions = {}): CAC {
function removeQuotes (line 203) | function removeQuotes<T>(str: T): T {
function splitArgv (line 219) | function splitArgv(argv: string): string[] {
function parseCLI (line 228) | function parseCLI(argv: string | string[], config: CliParseOptions = {}): {
function runRelated (line 258) | async function runRelated(relatedFiles: string[] | string, argv: CliOpti...
function watch (line 264) | async function watch(cliFilters: string[], options: CliOptions): Promise...
function run (line 269) | async function run(cliFilters: string[], options: CliOptions): Promise<v...
function benchmark (line 276) | async function benchmark(cliFilters: string[], options: CliOptions): Pro...
function normalizeCliOptions (line 281) | function normalizeCliOptions(cliFilters: string[], argv: CliOptions): Cl...
function start (line 301) | async function start(mode: VitestRunMode, cliFilters: string[], options:...
function init (line 323) | async function init(project: string) {
function collect (line 333) | async function collect(mode: VitestRunMode, cliFilters: string[], option...
FILE
Condensed preview — 2731 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,655K chars).
[
{
"path": ".claude/agents/vitest-test-writer.md",
"chars": 6073,
"preview": "---\nname: vitest-test-writer\ndescription: \"Use this agent when the user needs to write comprehensive tests for Vitest fe"
},
{
"path": ".editorconfig",
"chars": 147,
"preview": "root = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = true\ntrim_"
},
{
"path": ".gitattributes",
"chars": 84,
"preview": "* text=auto eol=lf\n\ntest/cli/fixtures/reporters/indicator-position.test.js eol=crlf\n"
},
{
"path": ".github/FUNDING.yml",
"chars": 76,
"preview": "github: [vitest-dev, sheremet-va, antfu, patak-dev]\nopen_collective: vitest\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 3161,
"preview": "name: 🐞 Bug report\ndescription: Report an issue with Vitest\nlabels: [pending triage]\ntype: Bug\nbody:\n - type: markdown\n"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 550,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: VS Code Extension Issues\n url: https://github.com/vitest-dev/vsc"
},
{
"path": ".github/ISSUE_TEMPLATE/docs.yml",
"chars": 1236,
"preview": "name: 📚 Documentation\ndescription: Suggest a change or new page to be added to vitest.dev\nlabels: [documentation]\nbody:\n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 1881,
"preview": "name: 🚀 New feature proposal\ndescription: Propose a new feature to be added to Vitest\nlabels: ['enhancement: pending tri"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1422,
"preview": "### Description\n\n<!-- Please insert your description here and provide especially info about the \"what\" this PR is solvin"
},
{
"path": ".github/actions/setup-and-cache/action.yml",
"chars": 518,
"preview": "name: Setup and cache\ndescription: Setup for node, pnpm and cache for browser testing binaries\ninputs:\n node-version:\n "
},
{
"path": ".github/actions/setup-playwright/action.yml",
"chars": 1641,
"preview": "name: Setup Playwright\ndescription: Setup and cache Playwright browser binaries\n\nruns:\n using: composite\n steps:\n -"
},
{
"path": ".github/commit-convention.md",
"chars": 2901,
"preview": "## Git Commit Message Convention\n\n> This is adapted from [Angular's commit convention](https://github.com/conventional-c"
},
{
"path": ".github/copilot-instructions.md",
"chars": 323,
"preview": "# copilot-instructions.md\n\nThis file provides guidance to Copilot Agent when working with code in this repository.\n\n## C"
},
{
"path": ".github/renovate.json5",
"chars": 1000,
"preview": "{\n \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n \"extends\": [\"config:recommended\", \"schedule:weekly"
},
{
"path": ".github/workflows/ci.yml",
"chars": 6250,
"preview": "name: CI\n\n# Remove default permissions of GITHUB_TOKEN for security\n# https://docs.github.com/en/actions/using-jobs/assi"
},
{
"path": ".github/workflows/cr.yml",
"chars": 1241,
"preview": "name: CR\n\non:\n push:\n branches: [main]\n pull_request:\n types: [opened, synchronize, labeled]\n\npermissions: {}\n\nc"
},
{
"path": ".github/workflows/ecosystem-ci-trigger.yml",
"chars": 3716,
"preview": "name: ecosystem-ci trigger\n\non:\n issue_comment:\n types: [created]\n\njobs:\n trigger:\n runs-on: ubuntu-latest\n i"
},
{
"path": ".github/workflows/issue-close-require.yml",
"chars": 493,
"preview": "name: Issue Close Require\n\non:\n schedule:\n - cron: '0 0 * * *'\n\njobs:\n close-issues:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/issue-labeled.yml",
"chars": 960,
"preview": "name: Issue Labeled\n\non:\n issues:\n types: [labeled]\n\njobs:\n reply-labeled:\n runs-on: ubuntu-latest\n permissio"
},
{
"path": ".github/workflows/lock-closed-issues.yml",
"chars": 516,
"preview": "name: Lock Closed Issues\n\non:\n schedule:\n - cron: '0 0 * * *'\n\npermissions:\n issues: write\n\njobs:\n action:\n if:"
},
{
"path": ".github/workflows/publish.yml",
"chars": 1117,
"preview": "name: Publish Package\n\non:\n push:\n tags:\n - 'v*'\n\npermissions:\n contents: write\n id-token: write\n\nenv:\n VITE"
},
{
"path": ".gitignore",
"chars": 654,
"preview": "logs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n*.cpuprofile\n*.heapprofile\nlib-cov\ncoverage\n!**/integrations/c"
},
{
"path": ".npmrc",
"chars": 189,
"preview": "ignore-workspace-root-check=true\nstrict-peer-dependencies=false\nprovenance=true\nshell-emulator=true\nregistry=https://reg"
},
{
"path": ".tazerc.json",
"chars": 147,
"preview": "{\n \"exclude\": [\n \"vue\",\n \"pretty-format\"\n ],\n \"packageMode\": {\n \"vue\": \"minor\",\n \"codemirror\": \"minor\",\n "
},
{
"path": ".vscode/extensions.json",
"chars": 83,
"preview": "{\n \"recommendations\": [\n \"vitest.explorer\",\n \"dbaeumer.vscode-eslint\"\n ]\n}\n"
},
{
"path": ".vscode/settings.json",
"chars": 1350,
"preview": "{\n // Disable the default formatter, use eslint instead\n \"prettier.enable\": false,\n \"editor.formatOnSave\": false,\n\n "
},
{
"path": ".vscode/tasks.json",
"chars": 2073,
"preview": "{\n \"version\": \"2.0.0\",\n \"tasks\": [\n {\n \"type\": \"npm\",\n \"script\": \"dev\",\n \"label\": \"npm: dev\",\n "
},
{
"path": "AGENTS.md",
"chars": 5520,
"preview": "# Vitest AI Agent Guide\n\nThis document provides comprehensive information for AI agents working on the Vitest codebase.\n"
},
{
"path": "CLAUDE.md",
"chars": 321,
"preview": "# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## "
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3431,
"preview": "# Code Of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and"
},
{
"path": "CONTRIBUTING.md",
"chars": 7734,
"preview": "# Vitest Contributing Guide\n\nHi! We are really excited that you are interested in contributing to Vitest. Before submitt"
},
{
"path": "FUNDING.json",
"chars": 107,
"preview": "{\n \"drips\": {\n \"ethereum\": {\n \"ownedBy\": \"0x929Eb10Cf1621b26199120a521C785F8271e0b78\"\n }\n }\n}\n"
},
{
"path": "LICENSE",
"chars": 1102,
"preview": "MIT License\n\nCopyright (c) 2021-Present VoidZero Inc. and Vitest contributors\n\nPermission is hereby granted, free of cha"
},
{
"path": "README.md",
"chars": 4885,
"preview": "<p align=\"center\">\n <br>\n <br>\n <a href=\"https://vitest.dev\" target=\"_blank\" rel=\"noopener noreferrer\">\n <picture>"
},
{
"path": "SECURITY.md",
"chars": 321,
"preview": "# Reporting a Vulnerability\n\nTo report a vulnerability, please open a private vulnerability report at https://github.com"
},
{
"path": "docs/.vitepress/blog.data.ts",
"chars": 828,
"preview": "import { createContentLoader } from 'vitepress'\n\ninterface Post {\n title: string\n url: string\n date: {\n time: numb"
},
{
"path": "docs/.vitepress/components/Advanced.vue",
"chars": 277,
"preview": "<template>\n <Badge type=\"danger\" title=\"This is an advanced API intended for library authors and framework integrations"
},
{
"path": "docs/.vitepress/components/ArrowDown.vue",
"chars": 457,
"preview": "<template>\n <span class=\"arrow-down\">\n <span class=\"arrow-line\" />\n <span class=\"arrow-head\" />\n </span>\n</templ"
},
{
"path": "docs/.vitepress/components/BlogIndex.vue",
"chars": 859,
"preview": "<script setup lang=\"ts\">\nimport { data as posts } from '../blog.data'\n\nfunction getDateTime(time: number) {\n return new"
},
{
"path": "docs/.vitepress/components/Box.vue",
"chars": 294,
"preview": "<template>\n <span class=\"box\">\n <slot />\n </span>\n</template>\n\n<style scoped>\n.box {\n display: flex;\n width: 100%"
},
{
"path": "docs/.vitepress/components/CRoot.vue",
"chars": 565,
"preview": "<script setup>\nimport { Icon } from '@iconify/vue'\n</script>\n\n<template>\n <Badge type=\"warning\" title=\"This options is "
},
{
"path": "docs/.vitepress/components/CourseLink.vue",
"chars": 531,
"preview": "<script setup lang=\"ts\">\nimport { Icon } from '@iconify/vue'\n\ndefineProps<{\n href: string\n}>()\n</script>\n\n<template>\n "
},
{
"path": "docs/.vitepress/components/Deprecated.vue",
"chars": 73,
"preview": "<template>\n <Badge type=\"danger\">\n deprecated\n </Badge>\n</template>\n"
},
{
"path": "docs/.vitepress/components/Experimental.vue",
"chars": 233,
"preview": "<template>\n <Badge type=\"warning\" title=\"This feature is experimental and does not follow SemVer.\" class=\"experimental-"
},
{
"path": "docs/.vitepress/components/FeaturesList.vue",
"chars": 2619,
"preview": "<script setup>\nimport ListItem from './ListItem.vue'\n</script>\n\n<template>\n <ul\n class=\"features-list\"\n dir=\"auto"
},
{
"path": "docs/.vitepress/components/HomePage.vue",
"chars": 1823,
"preview": "<script setup lang=\"ts\">\nimport { VPHomeSponsors } from '@voidzero-dev/vitepress-theme'\nimport { sponsors } from '../spo"
},
{
"path": "docs/.vitepress/components/ListItem.vue",
"chars": 2259,
"preview": "<script setup lang=\"ts\">\nimport { Icon } from '@iconify/vue'\nimport { until, useElementVisibility } from '@vueuse/core'\n"
},
{
"path": "docs/.vitepress/components/Version.vue",
"chars": 407,
"preview": "<script setup lang=\"ts\">\nimport { VPBadge } from '@voidzero-dev/vitepress-theme'\n\nconst { type = 'stable' } = defineProp"
},
{
"path": "docs/.vitepress/config.ts",
"chars": 35024,
"preview": "import { transformerTwoslash } from '@shikijs/vitepress-twoslash'\nimport { transformerNotationWordHighlight } from '@shi"
},
{
"path": "docs/.vitepress/contributors.ts",
"chars": 4641,
"preview": "import type { DefaultTheme } from 'vitepress'\n\nexport interface Contributor {\n name: string\n avatar: string\n}\n\nexport "
},
{
"path": "docs/.vitepress/meta.ts",
"chars": 1574,
"preview": "// noinspection ES6PreferShortImport: IntelliJ IDE hint to avoid warning to use `~/contributors`, will fail on build if "
},
{
"path": "docs/.vitepress/scripts/cli-generator.ts",
"chars": 2734,
"preview": "import type { CLIOption, CLIOptions } from '../../../packages/vitest/src/node/cli/cli-config'\nimport { writeFileSync } f"
},
{
"path": "docs/.vitepress/scripts/fetch-avatars.ts",
"chars": 942,
"preview": "import { existsSync, promises as fsp } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { dirname, join, r"
},
{
"path": "docs/.vitepress/scripts/pwa.ts",
"chars": 2986,
"preview": "import type { PwaOptions } from '@vite-pwa/vitepress'\nimport {\n githubusercontentRegex,\n pwaFontsRegex,\n pwaFontStyle"
},
{
"path": "docs/.vitepress/scripts/transformHead.ts",
"chars": 594,
"preview": "import type { HeadConfig, TransformContext } from 'vitepress'\n\nimport { preconnectHomeLinks, preconnectLinks } from '../"
},
{
"path": "docs/.vitepress/sponsors.ts",
"chars": 1386,
"preview": "import type { SponsorTier } from '@voidzero-dev/vitepress-theme/src/types/sponsors'\n\nexport const sponsors: SponsorTier["
},
{
"path": "docs/.vitepress/theme/FeatureGrid.vue",
"chars": 3149,
"preview": "<script setup>\nimport esmAnimation from '@assets/vitest/animations/640_x_300_esm.riv'\nimport vitePoweredAnimation from '"
},
{
"path": "docs/.vitepress/theme/Hero.vue",
"chars": 1701,
"preview": "<template>\n <div class=\"wrapper wrapper--ticks grid md:grid-cols-2 w-full border-nickel divide-x\">\n <div class=\"flex"
},
{
"path": "docs/.vitepress/theme/Home.vue",
"chars": 1099,
"preview": "<script setup>\nimport Footer from '@components/oss/Footer.vue'\n// import TrustedBy from '@components/oss/TrustedBy.vue'\n"
},
{
"path": "docs/.vitepress/theme/Intro.vue",
"chars": 1496,
"preview": "<template>\n <div class=\"wrapper wrapper--ticks border-t py-14 lg:py-30 px-5 sm:px-10 lg:px-20\">\n <div class=\"flex fl"
},
{
"path": "docs/.vitepress/theme/index.ts",
"chars": 2712,
"preview": "import type { Theme } from 'vitepress'\nimport TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'\nimport { inB"
},
{
"path": "docs/.vitepress/theme/pwa.ts",
"chars": 83,
"preview": "import { registerSW } from 'virtual:pwa-register'\n\nregisterSW({ immediate: true })\n"
},
{
"path": "docs/.vitepress/theme/styles.css",
"chars": 1605,
"preview": "@import \"@voidzero-dev/vitepress-theme/src/styles/index.css\";\n\n@source \"./**/*.vue\";\n\n/* Vitest */\n:root[data-variant=\"v"
},
{
"path": "docs/api/advanced/artifacts.md",
"chars": 7667,
"preview": "---\noutline: deep\ntitle: Test Artifacts\n---\n\n# Test Artifacts <Advanced /> <Version type=\"experimental\">4.0.11</Version>"
},
{
"path": "docs/api/advanced/import-example.md",
"chars": 59,
"preview": "```ts\nfunction import<T>(moduleId: string): Promise<T>\n```\n"
},
{
"path": "docs/api/advanced/metadata.md",
"chars": 3066,
"preview": "# Task Metadata <Badge type=\"danger\">advanced</Badge>\n\nIf you are developing a custom reporter or using Vitest Node.js A"
},
{
"path": "docs/api/advanced/plugin.md",
"chars": 6165,
"preview": "---\ntitle: Plugin API\noutline: deep\n---\n\n# Plugin API <Version>3.1.0</Version> {#plugin-api}\n\n::: warning\nThis is an adv"
},
{
"path": "docs/api/advanced/reporters.md",
"chars": 13344,
"preview": "# Reporters\n\n::: warning\nThis is an advanced API. If you just want to configure built-in reporters, read the [\"Reporters"
},
{
"path": "docs/api/advanced/runner.md",
"chars": 11246,
"preview": "# Runner API <Badge type=\"danger\">advanced</Badge>\n\n::: warning\nThis is advanced API. If you just want to [run tests](/g"
},
{
"path": "docs/api/advanced/test-case.md",
"chars": 7669,
"preview": "# TestCase\n\nThe `TestCase` class represents a single test. This class is only available in the main thread. Refer to the"
},
{
"path": "docs/api/advanced/test-collection.md",
"chars": 2249,
"preview": "# TestCollection\n\n`TestCollection` represents a collection of top-level [suites](/api/advanced/test-suite) and [tests](/"
},
{
"path": "docs/api/advanced/test-module.md",
"chars": 4435,
"preview": "# TestModule\n\nThe `TestModule` class represents a single module in a single project. This class is only available in the"
},
{
"path": "docs/api/advanced/test-project.md",
"chars": 10646,
"preview": "---\ntitle: TestProject\n---\n\n# TestProject <Version>3.0.0</Version> {#testproject}\n\n::: warning\nThis guide describes the "
},
{
"path": "docs/api/advanced/test-specification.md",
"chars": 3102,
"preview": "# TestSpecification\n\nThe `TestSpecification` class describes what module to run as a test and its parameters.\n\nYou can o"
},
{
"path": "docs/api/advanced/test-suite.md",
"chars": 6472,
"preview": "# TestSuite\n\nThe `TestSuite` class represents a single suite. This class is only available in the main thread. Refer to "
},
{
"path": "docs/api/advanced/vitest.md",
"chars": 25985,
"preview": "---\noutline: deep\ntitle: Vitest API\n---\n\n# Vitest\n\nVitest instance requires the current test mode. It can be either:\n\n- "
},
{
"path": "docs/api/assert-type.md",
"chars": 729,
"preview": "# assertType\n\n::: warning\nDuring runtime this function doesn't do anything. To [enable typechecking](/guide/testing-type"
},
{
"path": "docs/api/assert.md",
"chars": 56216,
"preview": "# assert\n\nVitest reexports the `assert` method from [`chai`](https://www.chaijs.com/api/assert/) for verifying invariant"
},
{
"path": "docs/api/browser/assertions.md",
"chars": 45501,
"preview": "---\ntitle: Assertion API | Browser Mode\n---\n\n# Assertion API\n\nVitest provides a wide range of DOM assertions out of the "
},
{
"path": "docs/api/browser/commands.md",
"chars": 5203,
"preview": "---\ntitle: Commands | Browser Mode\noutline: deep\n---\n\n# Commands\n\nCommand is a function that invokes another function on"
},
{
"path": "docs/api/browser/context.md",
"chars": 10932,
"preview": "---\ntitle: Context API | Browser Mode\n---\n\n# Context API\n\nVitest exposes a context module via `vitest/browser` entry poi"
},
{
"path": "docs/api/browser/interactivity.md",
"chars": 21719,
"preview": "---\ntitle: Interactivity API | Browser Mode\n---\n\n# Interactivity API\n\nVitest implements a subset of [`@testing-library/u"
},
{
"path": "docs/api/browser/locators.md",
"chars": 35151,
"preview": "---\ntitle: Locators | Browser Mode\noutline: [2, 3]\n---\n\n# Locators\n\nA locator is a representation of an element or a num"
},
{
"path": "docs/api/browser/react.md",
"chars": 11611,
"preview": "---\noutline: deep\n---\n\n# vitest-browser-react\n\nThe community [`vitest-browser-react`](https://npmx.dev/package/vitest-br"
},
{
"path": "docs/api/browser/svelte.md",
"chars": 9235,
"preview": "---\noutline: deep\n---\n\n# vitest-browser-svelte\n\nThe community [`vitest-browser-svelte`](https://npmx.dev/package/vitest-"
},
{
"path": "docs/api/browser/vue.md",
"chars": 8284,
"preview": "---\noutline: deep\n---\n\n# vitest-browser-vue\n\nThe community [`vitest-browser-vue`](https://npmx.dev/package/vitest-browse"
},
{
"path": "docs/api/describe.md",
"chars": 10249,
"preview": "---\noutline: deep\n---\n\n# describe\n\n- **Alias:** `suite`\n\n```ts\nfunction describe(\n name: string | Function,\n body?: ()"
},
{
"path": "docs/api/expect-typeof.md",
"chars": 14161,
"preview": "# expectTypeOf\n\n::: warning\nDuring runtime this function doesn't do anything. To [enable typechecking](/guide/testing-ty"
},
{
"path": "docs/api/expect.md",
"chars": 60153,
"preview": "# expect\n\nThe following types are used in the type signatures below\n\n```ts\ntype Awaitable<T> = T | PromiseLike<T>\n```\n\n`"
},
{
"path": "docs/api/hooks.md",
"chars": 14015,
"preview": "---\noutline: deep\n---\n\n# Hooks\n\nThese functions allow you to hook into the life cycle of tests to avoid repeating setup "
},
{
"path": "docs/api/mock.md",
"chars": 18053,
"preview": "# Mocks\n\nYou can create a mock function or a class to track its execution with the `vi.fn` method. If you want to track "
},
{
"path": "docs/api/test.md",
"chars": 23390,
"preview": "---\noutline: deep\n---\n\n# Test\n\n- **Alias:** `it`\n\n```ts\nfunction test(\n name: string | Function,\n body?: () => unknown"
},
{
"path": "docs/api/vi.md",
"chars": 41349,
"preview": "---\noutline: deep\n---\n\n# Vi\n\nVitest provides utility functions to help you out through its `vi` helper. You can access i"
},
{
"path": "docs/blog/vitest-3-2.md",
"chars": 10406,
"preview": "---\ntitle: Vitest 3.2 is out!\nauthor:\n name: The Vitest Team\ndate: 2025-06-02\nsidebar: false\nhead:\n - - meta\n - pro"
},
{
"path": "docs/blog/vitest-3.md",
"chars": 6683,
"preview": "---\ntitle: Vitest 3.0 is out!\nauthor:\n name: The Vitest Team\ndate: 2025-01-17\nsidebar: false\nhead:\n - - meta\n - pro"
},
{
"path": "docs/blog/vitest-4-1.md",
"chars": 20937,
"preview": "---\ntitle: Vitest 4.1 is out!\nauthor:\n name: The Vitest Team\ndate: 2026-03-12\nsidebar: false\nhead:\n - - meta\n - pro"
},
{
"path": "docs/blog/vitest-4.md",
"chars": 13543,
"preview": "---\ntitle: Vitest 4.0 is out!\nauthor:\n name: The Vitest Team\ndate: 2025-10-22\nsidebar: false\nhead:\n - - meta\n - pro"
},
{
"path": "docs/blog.md",
"chars": 188,
"preview": "---\nsidebar: false\neditLink: false\noutline: false\n---\n\n<script setup>\nimport BlogIndex from './.vitepress/components/Blo"
},
{
"path": "docs/config/alias.md",
"chars": 1013,
"preview": "---\ntitle: alias | Config\noutline: deep\n---\n\n# alias\n\n- **Type:** `Record<string, string> | Array<{ find: string | RegEx"
},
{
"path": "docs/config/allowonly.md",
"chars": 1101,
"preview": "---\ntitle: allowOnly | Config\noutline: deep\n---\n\n# allowOnly\n\n- **Type**: `boolean`\n- **Default**: `!process.env.CI`\n- *"
},
{
"path": "docs/config/api.md",
"chars": 1523,
"preview": "---\ntitle: api | Config\noutline: deep\n---\n\n# api\n\n- **Type:** `boolean | number | object`\n- **Default:** `false`\n- **CLI"
},
{
"path": "docs/config/attachmentsdir.md",
"chars": 264,
"preview": "---\ntitle: attachmentsDir | Config\noutline: deep\n---\n\n# attachmentsDir\n\n- **Type:** `string`\n- **Default:** `'.vitest-at"
},
{
"path": "docs/config/bail.md",
"chars": 558,
"preview": "---\ntitle: bail | Config\noutline: deep\n---\n\n# bail\n\n- **Type:** `number`\n- **Default:** `0`\n- **CLI**: `--bail=<value>`\n"
},
{
"path": "docs/config/benchmark.md",
"chars": 1658,
"preview": "---\ntitle: benchmark | Config\noutline: deep\n---\n\n# benchmark <Experimental /> {#benchmark}\n\n- **Type:** `{ include?, exc"
},
{
"path": "docs/config/browser/api.md",
"chars": 1705,
"preview": "---\ntitle: browser.api | Config\noutline: deep\n---\n\n# browser.api\n\n- **Type:** `number | object`\n- **Default:** `63315`\n-"
},
{
"path": "docs/config/browser/commands.md",
"chars": 274,
"preview": "---\ntitle: browser.commands | Config\noutline: deep\n---\n\n# browser.commands\n\n- **Type:** `Record<string, BrowserCommand>`"
},
{
"path": "docs/config/browser/connecttimeout.md",
"chars": 419,
"preview": "---\ntitle: browser.connectTimeout | Config\noutline: deep\n---\n\n# browser.connectTimeout\n\n- **Type:** `number`\n- **Default"
},
{
"path": "docs/config/browser/detailspanelposition.md",
"chars": 1306,
"preview": "---\ntitle: browser.detailsPanelPosition | Config\noutline: deep\n---\n\n# browser.detailsPanelPosition\n\n- **Type:** `'right'"
},
{
"path": "docs/config/browser/enabled.md",
"chars": 1196,
"preview": "---\ntitle: browser.enabled | Config\n---\n\n# browser.enabled\n\n- **Type:** `boolean`\n- **Default:** `false`\n- **CLI:** `--b"
},
{
"path": "docs/config/browser/expect.md",
"chars": 7290,
"preview": "---\ntitle: browser.expect | Config\noutline: deep\n---\n\n# browser.expect\n\n- **Type:** `ExpectOptions`\n\n## browser.expect.t"
},
{
"path": "docs/config/browser/headless.md",
"chars": 293,
"preview": "---\ntitle: browser.headless | Config\noutline: deep\n---\n\n# browser.headless\n\n- **Type:** `boolean`\n- **Default:** `proces"
},
{
"path": "docs/config/browser/instances.md",
"chars": 1654,
"preview": "---\ntitle: browser.instances | Config\noutline: deep\n---\n\n# browser.instances\n\n- **Type:** `BrowserConfig`\n- **Default:**"
},
{
"path": "docs/config/browser/isolate.md",
"chars": 361,
"preview": "---\ntitle: browser.isolate | Config\noutline: deep\n---\n\n# browser.isolate <Deprecated />\n\n- **Type:** `boolean`\n- **Defau"
},
{
"path": "docs/config/browser/locators.md",
"chars": 289,
"preview": "---\ntitle: browser.locators | Config\noutline: deep\n---\n\n# browser.locators\n\nOptions for built-in [browser locators](/api"
},
{
"path": "docs/config/browser/orchestratorscripts.md",
"chars": 1204,
"preview": "---\ntitle: browser.orchestratorScripts | Config\noutline: deep\n---\n\n# browser.orchestratorScripts\n\n- **Type:** `BrowserSc"
},
{
"path": "docs/config/browser/playwright.md",
"chars": 6890,
"preview": "# Configuring Playwright\n\nTo run tests using playwright, you need to install the [`@vitest/browser-playwright`](https://"
},
{
"path": "docs/config/browser/preview.md",
"chars": 2097,
"preview": "# Configuring Preview\n\n::: warning\nThe `preview` provider's main functionality is to show tests in a real browser enviro"
},
{
"path": "docs/config/browser/provider.md",
"chars": 2245,
"preview": "---\ntitle: browser.provider | Config\noutline: deep\n---\n\n# browser.provider {#browser-provider}\n\n- **Type:** `BrowserProv"
},
{
"path": "docs/config/browser/screenshotdirectory.md",
"chars": 238,
"preview": "---\ntitle: browser.screenshotDirectory | Config\noutline: deep\n---\n\n# browser.screenshotDirectory\n\n- **Type:** `string`\n-"
},
{
"path": "docs/config/browser/screenshotfailures.md",
"chars": 198,
"preview": "---\ntitle: browser.screenshotFailures | Config\noutline: deep\n---\n\n# browser.screenshotFailures\n\n- **Type:** `boolean`\n- "
},
{
"path": "docs/config/browser/testerhtmlpath.md",
"chars": 302,
"preview": "---\ntitle: browser.testerHtmlPath | Config\noutline: deep\n---\n\n# browser.testerHtmlPath\n\n- **Type:** `string`\n\nA path to "
},
{
"path": "docs/config/browser/trace.md",
"chars": 1612,
"preview": "---\ntitle: browser.trace | Config\noutline: deep\n---\n\n# browser.trace\n\n- **Type:** `'on' | 'off' | 'on-first-retry' | 'on"
},
{
"path": "docs/config/browser/trackunhandlederrors.md",
"chars": 495,
"preview": "---\ntitle: browser.trackUnhandledErrors | Config\noutline: deep\n---\n\n# browser.trackUnhandledErrors\n\n- **Type:** `boolean"
},
{
"path": "docs/config/browser/ui.md",
"chars": 236,
"preview": "---\ntitle: browser.ui | Config\noutline: deep\n---\n\n# browser.ui\n\n- **Type:** `boolean`\n- **Default:** `!isCI`\n- **CLI:** "
},
{
"path": "docs/config/browser/viewport.md",
"chars": 161,
"preview": "---\ntitle: browser.viewport | Config\noutline: deep\n---\n\n# browser.viewport\n\n- **Type:** `{ width, height }`\n- **Default:"
},
{
"path": "docs/config/browser/webdriverio.md",
"chars": 2282,
"preview": "# Configuring WebdriverIO\n\n::: info Playwright vs WebdriverIO\nIf you do not already use WebdriverIO in your project, we "
},
{
"path": "docs/config/cache.md",
"chars": 764,
"preview": "---\ntitle: cache | Config\noutline: deep\n---\n\n# cache <CRoot />\n\n- **Type**: `false`\n- **CLI**: `--no-cache`, `--cache=fa"
},
{
"path": "docs/config/chaiconfig.md",
"chars": 1255,
"preview": "---\ntitle: chaiConfig | Config\noutline: deep\n---\n\n# chaiConfig\n\n- **Type:** `{ includeStack?, showDiff?, truncateThresho"
},
{
"path": "docs/config/clearmocks.md",
"chars": 693,
"preview": "---\ntitle: clearMocks | Config\noutline: deep\n---\n\n# clearMocks\n\n- **Type:** `boolean`\n- **Default:** `false`\n\nShould Vit"
},
{
"path": "docs/config/coverage.md",
"chars": 12810,
"preview": "---\ntitle: coverage | Config\noutline: deep\n---\n\n# coverage <CRoot /> {#coverage}\n\nYou can use [`v8`](/guide/coverage.htm"
},
{
"path": "docs/config/css.md",
"chars": 1859,
"preview": "---\ntitle: css | Config\noutline: deep\n---\n\n# css\n\n- **Type**: `boolean | { include?, exclude?, modules? }`\n\nConfigure if"
},
{
"path": "docs/config/dangerouslyignoreunhandlederrors.md",
"chars": 720,
"preview": "---\ntitle: dangerouslyIgnoreUnhandledErrors | Config\noutline: deep\n---\n\n# dangerouslyIgnoreUnhandledErrors <CRoot />\n\n- "
},
{
"path": "docs/config/deps.md",
"chars": 6077,
"preview": "---\ntitle: deps | Config\noutline: deep\n---\n\n# deps\n\n- **Type:** `{ optimizer?, ... }`\n\nHandling for dependencies resolut"
},
{
"path": "docs/config/detectasyncleaks.md",
"chars": 1262,
"preview": "---\ntitle: detectAsyncLeaks | Config\noutline: deep\n---\n\n# detectAsyncLeaks\n\n- **Type:** `boolean`\n- **CLI:** `--detectAs"
},
{
"path": "docs/config/diff.md",
"chars": 2026,
"preview": "---\ntitle: diff | Config\noutline: deep\n---\n\n# diff\n\n- **Type:** `string`\n- **CLI:** `--diff=<path>`\n\n`DiffOptions` objec"
},
{
"path": "docs/config/dir.md",
"chars": 264,
"preview": "---\ntitle: dir | Config\noutline: deep\n---\n\n# dir\n\n- **Type:** `string`\n- **CLI:** `--dir=<path>`\n- **Default:** same as "
},
{
"path": "docs/config/disableconsoleintercept.md",
"chars": 630,
"preview": "---\ntitle: disableConsoleIntercept | Config\noutline: deep\n---\n\n# disableConsoleIntercept\n\n- **Type:** `boolean`\n- **CLI:"
},
{
"path": "docs/config/env.md",
"chars": 268,
"preview": "---\ntitle: env | Config\noutline: deep\n---\n\n# env\n\n- **Type:** `Partial<NodeJS.ProcessEnv>`\n\nEnvironment variables availa"
},
{
"path": "docs/config/environment.md",
"chars": 3043,
"preview": "---\ntitle: environment | Config\n---\n\n# environment\n\n- **Type:** `'node' | 'jsdom' | 'happy-dom' | 'edge-runtime' | strin"
},
{
"path": "docs/config/environmentoptions.md",
"chars": 881,
"preview": "---\ntitle: environmentOptions | Config\n---\n\n# environmentOptions\n\n- **Type:** `Record<'jsdom' | 'happyDOM' | string, unk"
},
{
"path": "docs/config/exclude.md",
"chars": 1574,
"preview": "---\ntitle: exclude | Config\n---\n\n# exclude\n\n- **Type:** `string[]`\n- **Default:** `['**/node_modules/**', '**/.git/**']`"
},
{
"path": "docs/config/execargv.md",
"chars": 413,
"preview": "---\ntitle: execArgv | Config\noutline: deep\n---\n\n# execArgv\n\n- **Type:** `string[]`\n- **Default:** `[]`\n\nPass additional "
},
{
"path": "docs/config/expandsnapshotdiff.md",
"chars": 241,
"preview": "---\ntitle: expandSnapshotDiff | Config\noutline: deep\n---\n\n# expandSnapshotDiff\n\n- **Type:** `boolean`\n- **CLI:** `--expa"
},
{
"path": "docs/config/expect.md",
"chars": 1407,
"preview": "---\ntitle: expect | Config\noutline: deep\n---\n\n# expect\n\n- **Type:** `ExpectOptions`\n\n## expect.requireAssertions\n\n- **Ty"
},
{
"path": "docs/config/experimental.md",
"chars": 17416,
"preview": "---\ntitle: experimental | Config\noutline: deep\n---\n\n# experimental\n\n## experimental.fsModuleCache <Version type=\"experim"
},
{
"path": "docs/config/faketimers.md",
"chars": 2229,
"preview": "---\ntitle: fakeTimers | Config\noutline: deep\n---\n\n# fakeTimers\n\n- **Type:** `FakeTimerInstallOpts`\n\nOptions that Vitest "
},
{
"path": "docs/config/fileparallelism.md",
"chars": 526,
"preview": "---\ntitle: fileParallelism | Config\noutline: deep\n---\n\n# fileParallelism\n\n- **Type:** `boolean`\n- **Default:** `true`\n- "
},
{
"path": "docs/config/forcereruntriggers.md",
"chars": 791,
"preview": "---\ntitle: forceRerunTriggers | Config\noutline: deep\n---\n\n# forceRerunTriggers <CRoot />\n\n- **Type**: `string[]`\n- **Def"
},
{
"path": "docs/config/globals.md",
"chars": 1197,
"preview": "---\ntitle: globals | Config\n---\n\n# globals\n\n- **Type:** `boolean`\n- **Default:** `false`\n- **CLI:** `--globals`, `--no-g"
},
{
"path": "docs/config/globalsetup.md",
"chars": 2592,
"preview": "---\ntitle: globalSetup | Config\noutline: deep\n---\n\n# globalSetup\n\n- **Type:** `string | string[]`\n\nPath to global setup "
},
{
"path": "docs/config/hideskippedtests.md",
"chars": 206,
"preview": "---\ntitle: hideSkippedTests | Config\noutline: deep\n---\n\n# hideSkippedTests\n\n- **Type:** `boolean`\n- **CLI:** `--hideSkip"
},
{
"path": "docs/config/hooktimeout.md",
"chars": 303,
"preview": "---\ntitle: hookTimeout | Config\noutline: deep\n---\n\n# hookTimeout\n\n- **Type:** `number`\n- **Default:** `10_000` in Node.j"
},
{
"path": "docs/config/include-source.md",
"chars": 2811,
"preview": "---\ntitle: includeSource | Config\n---\n\n# includeSource\n\n- **Type:** `string[]`\n- **Default:** `[]`\n\nA list of [glob patt"
},
{
"path": "docs/config/include.md",
"chars": 1800,
"preview": "---\ntitle: include | Config\n---\n\n# include\n\n- **Type:** `string[]`\n- **Default:** `['**/*.{test,spec}.?(c|m)[jt]s?(x)']`"
},
{
"path": "docs/config/includetasklocation.md",
"chars": 815,
"preview": "---\ntitle: includeTaskLocation | Config\noutline: deep\n---\n\n# includeTaskLocation\n\n- **Type:** `boolean`\n- **Default:** `"
},
{
"path": "docs/config/index.md",
"chars": 3337,
"preview": "---\noutline: deep\n---\n\n# Configuring Vitest\n\nIf you are using Vite and have a `vite.config` file, Vitest will read it to"
},
{
"path": "docs/config/isolate.md",
"chars": 560,
"preview": "---\ntitle: isolate | Config\noutline: deep\n---\n\n# isolate\n\n- **Type:** `boolean`\n- **Default:** `true`\n- **CLI:** `--no-i"
},
{
"path": "docs/config/logheapusage.md",
"chars": 234,
"preview": "---\ntitle: logHeapUsage | Config\noutline: deep\n---\n\n# logHeapUsage\n\n- **Type**: `boolean`\n- **Default**: `false`\n- **CLI"
},
{
"path": "docs/config/maxconcurrency.md",
"chars": 541,
"preview": "---\ntitle: maxConcurrency | Config\noutline: deep\n---\n\n# maxConcurrency\n\n- **Type**: `number`\n- **Default**: `5`\n- **CLI*"
},
{
"path": "docs/config/maxworkers.md",
"chars": 1145,
"preview": "---\ntitle: maxWorkers | Config\noutline: deep\n---\n\n# maxWorkers\n\n- **Type:** `number | string`\n- **Default:**\n - if [`wa"
},
{
"path": "docs/config/mockreset.md",
"chars": 700,
"preview": "---\ntitle: mockReset | Config\noutline: deep\n---\n\n# mockReset\n\n- **Type:** `boolean`\n- **Default:** `false`\n\nShould Vites"
},
{
"path": "docs/config/mode.md",
"chars": 146,
"preview": "---\ntitle: mode | Config\noutline: deep\n---\n\n# mode\n\n- **Type:** `string`\n- **CLI:** `--mode=staging`\n- **Default:** `'te"
},
{
"path": "docs/config/name.md",
"chars": 2873,
"preview": "---\ntitle: name | Config\n---\n\n# name\n\n- **Type:**\n\n```ts\ninterface UserConfig {\n name?: string | { label: string; color"
},
{
"path": "docs/config/onconsolelog.md",
"chars": 729,
"preview": "---\ntitle: onConsoleLog | Config\noutline: deep\n---\n\n# onConsoleLog <CRoot />\n\n```ts\nfunction onConsoleLog(\n log: string"
},
{
"path": "docs/config/onstacktrace.md",
"chars": 1295,
"preview": "---\ntitle: onStackTrace | Config\noutline: deep\n---\n\n# onStackTrace <CRoot />\n\n- **Type**: `(error: Error, frame: ParsedS"
},
{
"path": "docs/config/onunhandlederror.md",
"chars": 1000,
"preview": "---\ntitle: onUnhandledError | Config\noutline: deep\n---\n\n# onUnhandledError <CRoot /> <Version>4.0.0</Version>\n\n- **Type:"
},
{
"path": "docs/config/open.md",
"chars": 214,
"preview": "---\ntitle: open | Config\noutline: deep\n---\n\n# open <CRoot />\n\n- **Type:** `boolean`\n- **Default:** `!process.env.CI`\n- *"
},
{
"path": "docs/config/outputfile.md",
"chars": 427,
"preview": "---\ntitle: outputFile | Config\noutline: deep\n---\n\n# outputFile <CRoot /> {#outputfile}\n\n- **Type:** `string | Record<str"
},
{
"path": "docs/config/passwithnotests.md",
"chars": 237,
"preview": "---\ntitle: passWithNoTests | Config\noutline: deep\n---\n\n# passWithNoTests <CRoot />\n\n- **Type**: `boolean`\n- **Default**:"
},
{
"path": "docs/config/pool.md",
"chars": 2449,
"preview": "---\ntitle: pool | Config\noutline: deep\n---\n\n# pool\n\n- **Type:** `'threads' | 'forks' | 'vmThreads' | 'vmForks'`\n- **Defa"
},
{
"path": "docs/config/printconsoletrace.md",
"chars": 217,
"preview": "---\ntitle: printConsoleTrace | Config\noutline: deep\n---\n\n# printConsoleTrace\n\n- **Type:** `boolean`\n- **Default:** `fals"
},
{
"path": "docs/config/projects.md",
"chars": 173,
"preview": "---\ntitle: projects | Config\noutline: deep\n---\n\n# projects <CRoot />\n\n- **Type:** `TestProjectConfiguration[]`\n- **Defau"
},
{
"path": "docs/config/provide.md",
"chars": 1076,
"preview": "---\ntitle: provide | Config\noutline: deep\n---\n\n# provide\n\n- **Type:** `Partial<ProvidedContext>`\n\nDefine values that can"
},
{
"path": "docs/config/reporters.md",
"chars": 2409,
"preview": "---\ntitle: reporters | Config\n---\n\n# reporters <CRoot />\n\n- **Type:**\n\n```ts\ninterface UserConfig {\n reporters?: Config"
},
{
"path": "docs/config/resolvesnapshotpath.md",
"chars": 1152,
"preview": "---\ntitle: resolveSnapshotPath | Config\noutline: deep\n---\n\n# resolveSnapshotPath <CRoot />\n\n- **Type**: `(testPath: stri"
},
{
"path": "docs/config/restoremocks.md",
"chars": 744,
"preview": "---\ntitle: restoreMocks | Config\noutline: deep\n---\n\n# restoreMocks\n\n- **Type:** `boolean`\n- **Default:** `false`\n\nShould"
},
{
"path": "docs/config/retry.md",
"chars": 2895,
"preview": "---\ntitle: retry | Config\noutline: deep\n---\n\n# retry\n\nRetry the test specific number of times if it fails.\n\n- **Type:** "
},
{
"path": "docs/config/root.md",
"chars": 127,
"preview": "---\ntitle: root | Config\noutline: deep\n---\n\n# root\n\n- **Type:** `string`\n- **CLI:** `-r <path>`, `--root=<path>`\n\nProjec"
},
{
"path": "docs/config/runner.md",
"chars": 357,
"preview": "---\ntitle: runner | Config\noutline: deep\n---\n\n# runner\n\n- **Type**: `VitestRunnerConstructor`\n- **Default**: `node`, whe"
},
{
"path": "docs/config/sequence.md",
"chars": 5098,
"preview": "---\ntitle: sequence | Config\noutline: deep\n---\n\n# sequence\n\n- **Type**: `{ sequencer?, shuffle?, seed?, hooks?, setupFil"
},
{
"path": "docs/config/server.md",
"chars": 3149,
"preview": "---\ntitle: server | Config\noutline: deep\n---\n\n# server <Deprecated />\n\nBefore Vitest 4, this option was used to define t"
},
{
"path": "docs/config/setupfiles.md",
"chars": 1522,
"preview": "---\ntitle: setupFiles | Config\noutline: deep\n---\n\n# setupFiles\n\n- **Type:** `string | string[]`\n\nPaths to setup files re"
},
{
"path": "docs/config/silent.md",
"chars": 333,
"preview": "---\ntitle: silent | Config\noutline: deep\n---\n\n# silent <CRoot /> {#silent}\n\n- **Type:** `boolean | 'passed-only'`\n- **De"
},
{
"path": "docs/config/slowtestthreshold.md",
"chars": 318,
"preview": "---\ntitle: slowTestThreshold | Config\noutline: deep\n---\n\n# slowTestThreshold <CRoot />\n\n- **Type**: `number`\n- **Default"
},
{
"path": "docs/config/snapshotenvironment.md",
"chars": 1293,
"preview": "---\ntitle: snapshotEnvironment | Config\noutline: deep\n---\n\n# snapshotEnvironment\n\n- **Type:** `string`\n\nPath to a custom"
},
{
"path": "docs/config/snapshotformat.md",
"chars": 636,
"preview": "---\ntitle: snapshotFormat | Config\noutline: deep\n---\n\n# snapshotFormat <CRoot />\n\n- **Type:** `PrettyFormatOptions`\n\nFor"
},
{
"path": "docs/config/snapshotserializers.md",
"chars": 338,
"preview": "---\ntitle: snapshotSerializers | Config\noutline: deep\n---\n\n# snapshotSerializers <CRoot />\n\n- **Type:** `string[]`\n- **D"
},
{
"path": "docs/config/stricttags.md",
"chars": 949,
"preview": "---\ntitle: strictTags | Config\noutline: deep\n---\n\n# strictTags <Version>4.1.0</Version> {#stricttags}\n\n- **Type:** `bool"
},
{
"path": "docs/config/tags.md",
"chars": 3370,
"preview": "---\ntitle: tags | Config\noutline: deep\n---\n\n# tags <Version>4.1.0</Version> {#tags}\n\n- **Type:** `TestTagDefinition[]`\n-"
},
{
"path": "docs/config/teardowntimeout.md",
"chars": 285,
"preview": "---\ntitle: teardownTimeout | Config\noutline: deep\n---\n\n# teardownTimeout <CRoot /> {#teardowntimeout}\n\n- **Type:** `numb"
},
{
"path": "docs/config/testnamepattern.md",
"chars": 572,
"preview": "---\ntitle: testNamePattern | Config\noutline: deep\n---\n\n# testNamePattern <CRoot /> {#testnamepattern}\n\n- **Type** `strin"
},
{
"path": "docs/config/testtimeout.md",
"chars": 300,
"preview": "---\ntitle: testTimeout | Config\noutline: deep\n---\n\n# testTimeout\n\n- **Type:** `number`\n- **Default:** `5_000` in Node.js"
},
{
"path": "docs/config/typecheck.md",
"chars": 2247,
"preview": "---\ntitle: typecheck | Config\noutline: deep\n---\n\n# typecheck <Experimental /> {#typecheck}\n\nOptions for configuring [typ"
},
{
"path": "docs/config/ui.md",
"chars": 693,
"preview": "---\ntitle: ui | Config\noutline: deep\n---\n\n# ui <CRoot />\n\n- **Type:** `boolean`\n- **Default:** `false`\n- **CLI:** `--ui`"
},
{
"path": "docs/config/unstubenvs.md",
"chars": 657,
"preview": "---\ntitle: unstubEnvs | Config\noutline: deep\n---\n\n# unstubEnvs\n\n- **Type:** `boolean`\n- **Default:** `false`\n\nShould Vit"
},
{
"path": "docs/config/unstubglobals.md",
"chars": 691,
"preview": "---\ntitle: unstubGlobals | Config\noutline: deep\n---\n\n# unstubGlobals\n\n- **Type:** `boolean`\n- **Default:** `false`\n\nShou"
},
{
"path": "docs/config/update.md",
"chars": 723,
"preview": "---\ntitle: update | Config\noutline: deep\n---\n\n# update <CRoot /> {#update}\n\n- **Type:** `boolean | 'new' | 'all' | 'none"
},
{
"path": "docs/config/vmmemorylimit.md",
"chars": 1481,
"preview": "---\ntitle: vmMemoryLimit | Config\noutline: deep\n---\n\n# vmMemoryLimit\n\n- **Type:** `string | number`\n- **Default:** `1 / "
},
{
"path": "docs/config/watch.md",
"chars": 434,
"preview": "---\ntitle: watch | Config\noutline: deep\n---\n\n# watch <CRoot /> {#watch}\n\n- **Type:** `boolean`\n- **Default:** `!process."
},
{
"path": "docs/config/watchtriggerpatterns.md",
"chars": 1066,
"preview": "---\ntitle: watchTriggerPatterns | Config\noutline: deep\n---\n\n# watchTriggerPatterns <CRoot /> <Version>3.2.0</Version>\n\n-"
}
]
// ... and 2531 more files (download for full content)
About this extraction
This page contains the full source code of the vitest-dev/vitest GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2731 files (7.8 MB), approximately 2.2M tokens, and a symbol index with 7342 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.