{"id":15011718,"url":"https://github.com/preactjs/playwright-ct","last_synced_at":"2025-10-19T13:31:56.664Z","repository":{"id":65293367,"uuid":"558610266","full_name":"preactjs/playwright-ct","owner":"preactjs","description":"Preact adapter for Playwright Component testing","archived":false,"fork":false,"pushed_at":"2024-05-25T13:12:24.000Z","size":66,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T15:32:32.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/preactjs.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":["preactjs"],"open_collective":"preact"}},"created_at":"2022-10-27T22:50:08.000Z","updated_at":"2023-08-28T22:36:38.000Z","dependencies_parsed_at":"2024-11-05T20:37:59.189Z","dependency_job_id":null,"html_url":"https://github.com/preactjs/playwright-ct","commit_stats":{"total_commits":17,"total_committers":4,"mean_commits":4.25,"dds":0.6470588235294117,"last_synced_commit":"74dbc07a015701b3b681cdf33ada9ad3567b101c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fplaywright-ct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fplaywright-ct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fplaywright-ct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fplaywright-ct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preactjs","download_url":"https://codeload.github.com/preactjs/playwright-ct/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237143101,"owners_count":19262132,"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-09-24T19:41:30.109Z","updated_at":"2025-10-19T13:31:51.383Z","avatar_url":"https://github.com/preactjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/preactjs","https://opencollective.com/preact"],"categories":[],"sub_categories":[],"readme":"# Preact playwright component testing\n\n\u003e **Note**\n\u003e Playwright component testing is marked as experimental by the playwright team. \n\n## Usage\n\nFirst, install playwright and initialize component testing. Once that is done, install the preact adapter.\n\n```sh\nnpm init playwright@latest -- --ct\nnpm install -D @preact/playwright-ct\n```\n\nAfter installing we need to alter our config\n\n```ts\nimport { defineConfig } from \"@preact/playwright-ct\";\n\nexport default defineConfig({\n  // Your config\n});\n```\n\nNow you can start adding your first test:\n\n```jsx\n// App.jsx\nexport function App() {\n  return \u003ch1\u003eHello World!\u003c/h1\u003e\n}\n```\n\n```jsx\n// App.test.jsx\nimport { test, expect } from \"@preact/playwright-ct\";\nimport { App } from \"./App\";\n\ntest(\"should work\", async ({ mount }) =\u003e {\n  const component = await mount(\u003cApp /\u003e);\n  await expect(component).toContainText(\"hello world\");\n});\n```\n\nFollow the offical [playwright component testing documentation](https://playwright.dev/docs/test-components) for more information on how to use it.\n\n## License\n\nMIT, see the [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fplaywright-ct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreactjs%2Fplaywright-ct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fplaywright-ct/lists"}