{"id":15011722,"url":"https://github.com/preactjs/jest-preset-preact","last_synced_at":"2025-10-19T13:31:57.749Z","repository":{"id":50132769,"uuid":"272518851","full_name":"preactjs/jest-preset-preact","owner":"preactjs","description":"Jest preset for testing Preact apps","archived":false,"fork":false,"pushed_at":"2024-02-07T16:51:11.000Z","size":205,"stargazers_count":20,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T13:08:33.906Z","etag":null,"topics":["jest","preact","preset","testing"],"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/preactjs.png","metadata":{"funding":{"github":["preactjs"],"open_collective":"preact"},"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}},"created_at":"2020-06-15T18:50:51.000Z","updated_at":"2024-03-31T10:12:46.000Z","dependencies_parsed_at":"2024-02-18T09:44:34.557Z","dependency_job_id":null,"html_url":"https://github.com/preactjs/jest-preset-preact","commit_stats":{"total_commits":29,"total_committers":9,"mean_commits":"3.2222222222222223","dds":0.3448275862068966,"last_synced_commit":"461356916e1ad9c20cd2b054a75d1b206762bd6f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fjest-preset-preact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fjest-preset-preact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fjest-preset-preact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fjest-preset-preact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preactjs","download_url":"https://codeload.github.com/preactjs/jest-preset-preact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869499,"owners_count":16555292,"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":["jest","preact","preset","testing"],"created_at":"2024-09-24T19:41:30.380Z","updated_at":"2025-10-19T13:31:52.485Z","avatar_url":"https://github.com/preactjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/preactjs","https://opencollective.com/preact"],"categories":[],"sub_categories":[],"readme":"# jest-preset-preact\n\nJest preset containing all required configuration for writing tests for [preact](https://github.com/preactjs/preact).\n\nFeatures:\n\n- Transpiles JSX to `h()`\n- Aliases for `react` imports to point to `preact/compat`\n- Automatically serialize Preact `VNodes` in snapshots\n- Stub style imports (`.css`, `.less`, `.sass/scss`, etc)\n- Add typeahead preview for filtering in jest's watch mode\n\n## Usage\n\nInstall it via npm or yarn:\n\n```bash\nnpm install --save-dev jest-preset-preact\n# or via yarn\nyarn add -D jest-preset-preact\n```\n\n...and add the preset to your `jest.config.js` file.\n\n```js\n// jest.config.js\nmodule.exports = {\n\tpreset: 'jest-preset-preact',\n};\n```\n\nYou can override the default Babel config by providing your own Babel config file:\n\n```js\n// babel.config.js\nmodule.exports = {\n  env: {\n    test: {\n      plugins: [\n        [\n          \"@babel/plugin-transform-react-jsx\",\n          {\n            runtime: \"automatic\",\n            importSource: \"preact\"\n          }\n        ]\n      ]\n    }\n  }\n}\n```\n\nThis, for example, would enable the runtime JSX transform instead of the classic.\n\n## License\n\nMIT, see [the LICENSE file](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fjest-preset-preact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreactjs%2Fjest-preset-preact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fjest-preset-preact/lists"}