{"id":13417446,"url":"https://github.com/vitest-dev/vitest","last_synced_at":"2026-01-16T10:33:38.292Z","repository":{"id":36973277,"uuid":"434708679","full_name":"vitest-dev/vitest","owner":"vitest-dev","description":"Next generation testing framework powered by Vite.","archived":false,"fork":false,"pushed_at":"2025-05-05T13:43:50.000Z","size":41368,"stargazers_count":14265,"open_issues_count":356,"forks_count":1325,"subscribers_count":55,"default_branch":"main","last_synced_at":"2025-05-05T14:07:00.653Z","etag":null,"topics":["test","testing-tools","vite"],"latest_commit_sha":null,"homepage":"https://vitest.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitest-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["vitest-dev","sheremet-va","antfu","patak-dev"],"open_collective":"vitest"}},"created_at":"2021-12-03T19:19:49.000Z","updated_at":"2025-05-05T13:55:54.000Z","dependencies_parsed_at":"2024-03-04T19:14:26.209Z","dependency_job_id":"dcbda312-9bd4-45f7-b323-b82024465379","html_url":"https://github.com/vitest-dev/vitest","commit_stats":{"total_commits":4285,"total_committers":541,"mean_commits":7.920517560073937,"dds":0.7024504084014003,"last_synced_commit":"57c8740b27770013ecf9cff12c3d63cdbbfdb41f"},"previous_names":[],"tags_count":411,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitest-dev%2Fvitest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitest-dev%2Fvitest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitest-dev%2Fvitest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitest-dev%2Fvitest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitest-dev","download_url":"https://codeload.github.com/vitest-dev/vitest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253292122,"owners_count":21885036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["test","testing-tools","vite"],"created_at":"2024-07-30T22:00:37.345Z","updated_at":"2026-01-16T10:33:38.281Z","avatar_url":"https://github.com/vitest-dev.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://vitest.dev\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/11247099/145112184-a9ff6727-661c-439d-9ada-963124a281f7.png\" height=\"150\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\nVitest\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nNext generation testing framework powered by Vite.\n\u003cp\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vitest\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vitest?color=729B1B\u0026label=\"\u003e\u003c/a\u003e\n\u003cp\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://chat.vitest.dev\"\u003e\u003cb\u003eGet involved!\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n \u003ca href=\"https://vitest.dev\"\u003eDocumentation\u003c/a\u003e | \u003ca href=\"https://vitest.dev/guide/\"\u003eGetting Started\u003c/a\u003e | \u003ca href=\"https://vitest.dev/guide/#examples\"\u003eExamples\u003c/a\u003e | \u003ca href=\"https://vitest.dev/guide/why\"\u003eWhy Vitest?\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://cn.vitest.dev\"\u003e中文文档\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003e\n\n\u003c/h4\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Features\n\n- [Vite](https://vitejs.dev/)'s config, transformers, resolvers, and plugins. Use the same setup from your app!\n- [Jest Snapshot](https://jestjs.io/docs/snapshot-testing)\n- [Chai](https://www.chaijs.com/) built-in for assertions, with [Jest expect](https://jestjs.io/docs/expect) compatible APIs\n- [Smart \u0026 instant watch mode](https://vitest.dev/guide/features.html#watch-mode), like HMR for tests!\n- [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/).\n- [Tinyspy](https://github.com/tinylibs/tinyspy) built-in for mocking, stubbing, and spies.\n- [JSDOM](https://github.com/jsdom/jsdom) and [happy-dom](https://github.com/capricorn86/happy-dom) for DOM and browser API mocking\n- [Browser Mode](https://vitest.dev/guide/browser/) for running component tests in the browser\n- 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))\n- Benchmarking support with [Tinybench](https://github.com/tinylibs/tinybench)\n- [Projects](https://vitest.dev/guide/projects) support\n- [expect-type](https://github.com/mmkal/expect-type) for type-level testing\n- ESM first, top level await\n- Out-of-box TypeScript / JSX support\n- Filtering, timeouts, concurrent for suite and tests\n- Sharding support\n- Reporting Uncaught Errors\n- Run your tests in the browser natively\n\n\u003e Vitest requires Vite \u003e=v6.0.0 and Node \u003e=v20.0.0\n\n```ts\nimport { assert, describe, expect, it } from 'vitest'\n\ndescribe('suite name', () =\u003e {\n  it('foo', () =\u003e {\n    expect(1 + 1).toEqual(2)\n    expect(true).to.be.true\n  })\n\n  it('bar', () =\u003e {\n    assert.equal(Math.sqrt(4), 2)\n  })\n\n  it('snapshot', () =\u003e {\n    expect({ foo: 'bar' }).toMatchSnapshot()\n  })\n})\n```\n\n```bash\n$ npx vitest\n```\n\n## Sponsors\n\n### Vladimir Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Anthony Fu Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Patak Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Credits\n\nThanks to:\n\n- [The Jest team and community](https://jestjs.io/) for creating a delightful testing API\n- [@lukeed](https://github.com/lukeed) for the work on [uvu](https://github.com/lukeed/uvu) where we are inspired a lot from.\n- [@pi0](https://github.com/pi0) for the idea and implementation of using Vite to transform and bundle the server code.\n- [The Vite team](https://github.com/vitejs/vite) for brainstorming the initial idea.\n- [@patak-dev](https://github.com/patak-dev) for the awesome package name!\n\n## Contribution\n\nSee [Contributing Guide](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).\n\n## License\n\n[MIT](./LICENSE) License © 2021-Present VoidZero Inc. and Vitest contributors\n","funding_links":["https://github.com/sponsors/vitest-dev","https://github.com/sponsors/sheremet-va","https://github.com/sponsors/antfu","https://github.com/sponsors/patak-dev","https://opencollective.com/vitest"],"categories":["TypeScript","Plugins","Test Frameworks","Projects using `@faker-js/faker`","vite","按领域分类","Resources","Pre-packed","Awesome Tools","Integration tests using cypress","Components \u0026 Libraries","🌟 Community Integrations","Packages","Project Management",":wrench: JS/TS Tooling","Testing","测试工具（保证代码质量用）"],"sub_categories":["Framework-agnostic Plugins","JavaScript / TypeScript","前端","Official Resources","Dev tools","Languages","Dev Tools","Testing \u0026 Quality Assurance","Testing","React","Syntax highlighting","静态网站生成（写博客/文档用）"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitest-dev%2Fvitest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitest-dev%2Fvitest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitest-dev%2Fvitest/lists"}