{"id":19213636,"url":"https://github.com/awkweb/testing-wagmi","last_synced_at":"2026-02-24T09:34:50.238Z","repository":{"id":56754998,"uuid":"524250188","full_name":"awkweb/testing-wagmi","owner":"awkweb","description":"Example of how to write tests for wagmi","archived":false,"fork":false,"pushed_at":"2023-05-24T19:10:57.000Z","size":69,"stargazers_count":43,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T22:16:55.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awkweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-08-12T23:35:19.000Z","updated_at":"2025-05-12T10:59:46.000Z","dependencies_parsed_at":"2024-04-12T22:03:01.730Z","dependency_job_id":null,"html_url":"https://github.com/awkweb/testing-wagmi","commit_stats":null,"previous_names":["awkweb/testing-wagmi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/awkweb/testing-wagmi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awkweb%2Ftesting-wagmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awkweb%2Ftesting-wagmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awkweb%2Ftesting-wagmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awkweb%2Ftesting-wagmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awkweb","download_url":"https://codeload.github.com/awkweb/testing-wagmi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awkweb%2Ftesting-wagmi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-09T14:06:46.544Z","updated_at":"2026-02-24T09:34:50.201Z","avatar_url":"https://github.com/awkweb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testing wagmi\n\nQuick example of how to write tests for [wagmi](https://github.com/wagmi-dev/wagmi) using [React Testing Library](https://github.com/testing-library/react-testing-library) and [Playwright](https://github.com/microsoft/playwright).\n\n## Getting started\n\n1. Clone repository and install dependencies:\n\n```bash\npnpm install\n```\n\n2. Install [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil) to run local Ethereum node.\n3. Add environment variables from `.env.example` (recommened to use [direnv](https://direnv.net))\n4. Run dev server\n\n```bash\npnpm dev\n```\n\n## Unit/integration tests\n\nUnit and integration tests are run by [Vitest](https://vitest.dev) and rendered with a [custom `render` function](https://testing-library.com/docs/react-testing-library/setup/#custom-render) from React Testing Library. See [`components/Connect.test.tsx`](/components/Connect.test.tsx) and [`components/SendTip.test.tsx`](/components/SendTip.test.tsx) for more info.\n\n### Run\n\n1. Start Anvil in terminal session\n\n```bash\npnpm anvil\n```\n\n2. Start Vitest in watch mode in different terminal session\n\n```bash\npnpm test\n```\n\n## End-to-end tests\n\nEnd-to-end tests use [Playwright](https://github.com/microsoft/playwright). See [`test/pages/index.test.ts`](/test/pages/index.test.ts) for more info.\n\n### Run\n\n1. Start Anvil in terminal session\n\n```bash\npnpm anvil\n```\n\n2. Start dev server in different terminal session (make sure `NEXT_PUBLIC_PLAYWRIGHT_ENABLED` is set to `true`)\n\n```bash\npnpm dev\n```\n\n3. Start Playwright test runner\n\n```bash\npnpm test:e2e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawkweb%2Ftesting-wagmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawkweb%2Ftesting-wagmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawkweb%2Ftesting-wagmi/lists"}