{"id":21318977,"url":"https://github.com/zhcndoc/vitest","last_synced_at":"2026-05-17T03:07:13.479Z","repository":{"id":241665858,"uuid":"806890653","full_name":"zhcndoc/vitest","owner":"zhcndoc","description":"Vitest 中文文档","archived":false,"fork":false,"pushed_at":"2024-10-23T05:24:24.000Z","size":7353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-24T11:28:10.075Z","etag":null,"topics":["e2e-tests","testing","testing-tools","unit-testing","vite","vitest"],"latest_commit_sha":null,"homepage":"https://vitest.zhcndoc.com","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/zhcndoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["vitest-dev","sheremet-va","antfu","patak-dev"],"open_collective":"vitest"}},"created_at":"2024-05-28T05:35:41.000Z","updated_at":"2024-10-23T05:24:28.000Z","dependencies_parsed_at":"2024-05-29T15:33:32.415Z","dependency_job_id":"2d84533c-c5c9-46aa-8272-2558272d4e56","html_url":"https://github.com/zhcndoc/vitest","commit_stats":null,"previous_names":["zhcndoc/vitest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhcndoc%2Fvitest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhcndoc%2Fvitest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhcndoc%2Fvitest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhcndoc%2Fvitest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhcndoc","download_url":"https://codeload.github.com/zhcndoc/vitest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243796741,"owners_count":20349264,"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":["e2e-tests","testing","testing-tools","unit-testing","vite","vitest"],"created_at":"2024-11-21T19:30:20.769Z","updated_at":"2026-05-17T03:07:13.449Z","avatar_url":"https://github.com/zhcndoc.png","language":"TypeScript","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":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://vitest.dev\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://vitest.dev/vitest-light.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://vitest.dev/vitest-dark.svg\"\u003e\n      \u003cimg alt=\"Vitest logo\" src=\"https://vitest.dev/vitest-dark.svg\" height=\"60\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cbr\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://npmx.dev/package/vitest\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vitest?color=729B1B\u0026label=\" alt=\"current vitest version badge\"\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- Jest-compatible 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.4.0 and Node \u003e=v22.12.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\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg' alt=\"vitest's sponsors\"/\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhcndoc%2Fvitest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhcndoc%2Fvitest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhcndoc%2Fvitest/lists"}