{"id":19904356,"url":"https://github.com/alloc/wana-test-utils","last_synced_at":"2026-05-14T19:33:31.934Z","repository":{"id":107079076,"uuid":"270839079","full_name":"alloc/wana-test-utils","owner":"alloc","description":"Testing helpers for wana","archived":false,"fork":false,"pushed_at":"2020-07-06T23:57:39.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T04:12:02.309Z","etag":null,"topics":["wana"],"latest_commit_sha":null,"homepage":"","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/alloc.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}},"created_at":"2020-06-08T21:55:44.000Z","updated_at":"2020-07-06T23:57:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dacdec5-3df9-4c45-a1c9-1c672a6c4456","html_url":"https://github.com/alloc/wana-test-utils","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fwana-test-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fwana-test-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fwana-test-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fwana-test-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/wana-test-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241331853,"owners_count":19945467,"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":["wana"],"created_at":"2024-11-12T20:28:03.378Z","updated_at":"2026-05-14T19:33:31.872Z","avatar_url":"https://github.com/alloc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @wana/test-utils\n\nTesting helpers for `wana`\n\n## Usage\n\nCurrently, the only export is the `setupEnv` function, which provides a more\nfoolproof way to inject the `act` function. When you call `setupEnv`, you're\nnot required to set the `batchedUpdates` global.\n\n### `setupEnv` options\n\n- `act: Function`\n\n### `setupEnv` example\n\nThe popular `@testing-library/react` package can be injected with two imports and one function call.\n\n```jsx\nimport { setupEnv } from '@wana/test-utils'\nimport { act } from '@testing-library/react'\n\nsetupEnv({ act })\n```\n\n### Jest integration\n\nIf using `jest`, you can call `setupEnv` from what's called a \"setup file\". Try\npasting this into your `jest.config.js` file.\n\n```js\nsetupFiles: ['\u003crootDir\u003e/jest/setup.ts'],\n```\n\nThen create the `jest/setup.ts` module, and paste the first example into it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Fwana-test-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Fwana-test-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Fwana-test-utils/lists"}