{"id":19846679,"url":"https://github.com/chempogonzalez/vitest-react","last_synced_at":"2025-07-13T20:34:15.777Z","repository":{"id":65523220,"uuid":"488338316","full_name":"chempogonzalez/vitest-react","owner":"chempogonzalez","description":"🧪 Test utils setup for react/nextjs projects using Vitest","archived":false,"fork":false,"pushed_at":"2022-05-08T02:55:24.000Z","size":484,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T10:36:27.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/chempogonzalez.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}},"created_at":"2022-05-03T19:30:06.000Z","updated_at":"2022-05-06T01:56:40.000Z","dependencies_parsed_at":"2023-01-27T06:01:39.722Z","dependency_job_id":null,"html_url":"https://github.com/chempogonzalez/vitest-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chempogonzalez/vitest-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chempogonzalez%2Fvitest-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chempogonzalez%2Fvitest-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chempogonzalez%2Fvitest-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chempogonzalez%2Fvitest-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chempogonzalez","download_url":"https://codeload.github.com/chempogonzalez/vitest-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chempogonzalez%2Fvitest-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265199895,"owners_count":23726735,"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":[],"created_at":"2024-11-12T13:12:09.796Z","updated_at":"2025-07-13T20:34:15.734Z","avatar_url":"https://github.com/chempogonzalez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪 vitest-react [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003cimg src=\"https://img.shields.io/npm/v/vitest-react?style=for-the-badge\" /\u003e\n\n\u003e Auto setup project to use Vitest with TypeScript + test-utils\n\n\n## 🔖 Description\nTool to auto initialize vitest config for react/nextjs projects. Allow to use common test utils methods.\n\n\n## 📦 Installation\n```zsh\n# Install the package\n$ npm install -D vitest-react\n```\n\n## 🚀 Usage\nJust install the package and it will automatically create a vitest config file in your project root if needed.\n\nAlso you have some common test utils methods available:\n```ts\n/**\n * You can import some pre-setup common methods in your test files.\n */\nimport {\n  render,\n  renderWithNextRouter, // mocked next router\n  renderWithProviders,  // wrap component in providers\n  userEvent,            // all from @testing-library/user-event\n  \n  // All the @testing-library/react ones\n  screen,\n  waitFor,\n  // ...\n}\n\n\n/**\n * You can also use methods from\n * @testing-library/jest-dom automatically\n */\n  expect(element).toHaveClass('example-class')\n  expect(element).toBeVisible()\n  // ...\n```\n\n## 🤓 Happy Code\n\n\u003e Created with Typescript! ⚡ and latin music 🎺🎵\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchempogonzalez%2Fvitest-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchempogonzalez%2Fvitest-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchempogonzalez%2Fvitest-react/lists"}