<p dir="auto">I'm looking to integrate Playwright into CI, and was wondering if it was a known use-case and how to solve it within Playwright. I've seen some issues relying on chokidar, but would you recommend this?</p>
<h2 dir="auto">Description</h2>
<p dir="auto">As a user, I want to run my component tests only on changed files, as it would be a use case in a git hook (<a href="https://git-scm.com/docs/githooks#_pre_push" rel="nofollow"><code class="notranslate">pre-push</code></a>)</p>
<h2 dir="auto">Alternatives</h2>
<ul dir="auto">
<li><a href="https://jestjs.io/docs/cli#--onlychanged" rel="nofollow">https://jestjs.io/docs/cli#--onlychanged</a></li>
<li><a href="https://vitest.dev/guide/cli.html#changed" rel="nofollow">https://vitest.dev/guide/cli.html#changed</a></li>
</ul>
<h2 dir="auto">Preferred Solution</h2>
<p dir="auto">Enhancement of the cli commands, e.g.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="npx playwright test --only-changed"><pre class="notranslate">npx playwright <span class="pl-c1">test</span> --only-changed</pre></div>