{"id":48388908,"url":"https://github.com/pokujs/vue","last_synced_at":"2026-04-12T05:01:03.985Z","repository":{"id":349380773,"uuid":"1202096828","full_name":"pokujs/vue","owner":"pokujs","description":"A Poku plugin for Vue component testing with DOM adapters.","archived":false,"fork":false,"pushed_at":"2026-04-05T21:52:39.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T00:02:30.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/pokujs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["wellwelwel"]}},"created_at":"2026-04-05T15:39:31.000Z","updated_at":"2026-04-06T21:55:12.000Z","dependencies_parsed_at":"2026-04-07T00:01:33.770Z","dependency_job_id":null,"html_url":"https://github.com/pokujs/vue","commit_stats":null,"previous_names":["pokujs/vue"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pokujs/vue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokujs%2Fvue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokujs%2Fvue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokujs%2Fvue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokujs%2Fvue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pokujs","download_url":"https://codeload.github.com/pokujs/vue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokujs%2Fvue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31535203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2026-04-05T23:01:14.751Z","updated_at":"2026-04-08T01:00:29.524Z","avatar_url":"https://github.com/pokujs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/wellwelwel"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg height=\"180\" alt=\"Poku's Logo\" src=\"https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg\"\u003e\n\n# @pokujs/vue\n\nEnjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟\n\n---\n\n📘 [**Documentation**](https://github.com/pokujs/vue#readme)\n\n\u003c/div\u003e\n\n---\n\n🧪 [**@pokujs/vue**](https://github.com/pokujs/vue) is a **Poku** plugin for Vue component testing with DOM adapters.\n\n\u003e [!TIP]\n\u003e\n\u003e Render Vue components in isolated test files — automatic TSX loader injection, DOM environment setup, and optional render metrics included.\n\n---\n\n## Quickstart\n\n### Install\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"225\"\u003e\n\n```bash\n# Node.js\nnpm i -D @pokujs/vue\n```\n\n\u003c/td\u003e\n\u003ctd width=\"225\"\u003e\n\n```bash\n# Bun\nbun add -d @pokujs/vue\n```\n\n\u003c/td\u003e\n\u003ctd width=\"225\"\u003e\n\n```bash\n# Deno (optional)\ndeno add npm:@pokujs/vue\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nInstall a DOM adapter (at least one is required):\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"225\"\u003e\n\n```bash\n# happy-dom (recommended)\nnpm i -D happy-dom \\\n  @happy-dom/global-registrator\n```\n\n\u003c/td\u003e\n\u003ctd width=\"225\"\u003e\n\n```bash\n# jsdom\nnpm i -D jsdom\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Enable the Plugin\n\n```js\n// poku.config.js\nimport { defineConfig } from 'poku';\nimport { vueTestingPlugin } from '@pokujs/vue/plugin';\n\nexport default defineConfig({\n  plugins: [\n    vueTestingPlugin({\n      dom: 'happy-dom',\n    }),\n  ],\n});\n```\n\n### Write Tests\n\n```tsx\n// tests/my-component.test.tsx\nimport { afterEach, assert, test } from 'poku';\nimport { cleanup, render, screen } from '@pokujs/vue';\n\nafterEach(cleanup);\n\ntest('renders a heading', () =\u003e {\n  render(\u003ch1\u003eHello\u003c/h1\u003e);\n  assert.strictEqual(screen.getByRole('heading').textContent, 'Hello');\n});\n```\n\n---\n\n## Compatibility\n\n### Runtime × DOM Adapter\n\n|                  | Node.js ≥ 20 | Bun ≥ 1 | Deno ≥ 2 |\n| ---------------- | :----------: | :-----: | :------: |\n| **happy-dom**    |      ✅      |   ✅    |    ✅    |\n| **jsdom**        |      ✅      |   ✅    |    ⚠️    |\n| **custom setup** |      ✅      |   ✅    |    ✅    |\n\n\u003e [!NOTE]\n\u003e\n\u003e `jsdom` under Deno may be unstable depending on Deno's npm compatibility layer for the current `jsdom` version. For Deno projects, prefer `happy-dom`.\n\n---\n\n## Options\n\n```ts\nvueTestingPlugin({\n  /**\n   * DOM adapter to use. Defaults to 'happy-dom'.\n   * - 'happy-dom'       — fast, recommended for most tests\n   * - 'jsdom'           — broader browser API coverage\n   * - { setupModule }   — path to a custom DOM setup module\n   */\n  dom: 'happy-dom',\n\n  /** Base URL assigned to the DOM environment. */\n  domUrl: 'http://localhost:3000/',\n\n  /**\n   * Render metrics. Disabled by default.\n   * Pass `true` for defaults, or an object for fine-grained control.\n   */\n  metrics: {\n    enabled: true,\n    topN: 5,\n    minDurationMs: 0,\n    reporter(summary) {\n      console.log(summary.topSlowest);\n    },\n  },\n});\n```\n\n---\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokujs%2Fvue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpokujs%2Fvue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokujs%2Fvue/lists"}