Repository navigation
docs: add a component-testing skill - #8572
tay1orjones wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a1e411c7-7f69-4ce9-9e3f-6f7ddd87b2bc
|
There was a problem hiding this comment.
🟡 Changes recommended
Directly awaited interaction guidance needs an explicit browser-setup prerequisite to avoid React update warnings.
1 open issue
What changed in this PR
Adds component-testing conventions to the style-guide skill, supporting the browser-locator migration.
Changes:
- Expands skill guidance to cover test authoring, modification, and debugging.
- Documents interactions, assertion timing, React updates, locators, and intentional synthetic events.
| File | Description |
|---|---|
| .github/skills/style-guide/SKILL.md | Expands test-related usage and links the new topic. |
| .github/skills/style-guide/docs/component-testing.md | Adds browser component-testing guidance and examples. |
Review effort: Balanced
| }) | ||
| ``` | ||
|
|
||
| Await browser interactions directly, without wrapping them in `act`. |
There was a problem hiding this comment.
Fair point. Not sure how big of a deal it is though.
joshblack
left a comment
There was a problem hiding this comment.
@tay1orjones what do you think of having this be in a testing (or test) skill that has the same structure as the style guide one? Specifically a short entry SKILL.md that links out to references, as needed.
I'll make a PR real quick for a /write-skill skill too to see what you think in terms of structure. My guess right now is that generally we will want these files to have a way to be quickly scanned but I'm not sure yet 🤔
|
@joshblack Yeah! Either way works for me, mainly just wanted to get this up as a start to discussion. Do we want to avoid having another discover boundary for agents modifying behavior? It's probably less and less of a concern with current models. Selective loading within the style-guide skill should extend to this as well if we wanted to keep it here though. |
|
The current eslint config already enables the recommended Vitest and RTL rules for unit tests, but would we want to lint importing |
|
Going to mark this a draft until #8573 is in and I can use it to regen the skill with the skill creator ... skill 😆 |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a1e411c7-7f69-4ce9-9e3f-6f7ddd87b2bc
|
I used the new |

Related to #8527 and #8573.
Give agents a focused skill for writing and debugging Vitest browser tests. Follow the new write-skill conventions with explicit triggers and exclusions, keeping the guidance separate from component implementation and API design.
The guidance assumes the browser locator migration is complete and can land independently of the remaining migration work.
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Check that the skill triggers for Vitest browser tests and excludes Node/SSR and standalone Playwright suites. Review the distinction between direct awaited browser interactions, RTL's
actfor manual updates, and synchronous assertions.