add-test
Skill3 starsChanged 2 days agoMITView on GitHub
Écrire ou corriger un test (Vitest + Testing Library). À utiliser quand on ajoute de la logique, qu'on corrige un bug, ou qu'on demande des tests.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/veronatheir own version, first seen Nov 8, 2026
- TidalPaladin/skillstheir own version, first seen Nov 8, 2026
- flavien-ia/hypervibe-crafttheir own version, first seen Oct 25, 2026
- flavien-ia/hypervibe-harnesstheir own version, first seen Oct 23, 2026
- WhatIfWeDigDeeper/claude-code-courseratheir own version, first seen Oct 20, 2026
- nativewind/react-native-csstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use review-pr, triage and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DockerSkillreview-pr
Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.
Also in 3 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- gitkraken/vscode-gitlens★ 10ksame name
- nativewind/nativewind★ 8.1ksame name
- microsoft/verona★ 3.7ksame name
- The-OpenROAD-Project/OpenROAD★ 3.3ksame name
- OpenAEV-Platform/openaev★ 1.8ksame name
- DexForce/EmbodiChain★ 240same name
- fpindej/netrock★ 234same name
- nativewind/react-native-css★ 167same name
- osmandapp/web★ 63same name
- flavien-ia/hypervibe-craft★ 50same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-componentSkill
- add-formSkill
- add-motionSkill
- add-pageSkill
- deploySkill
- design-systemSkill
- fetch-dataSkill
- from-figmaSkill
- polish-uiSkill
- rebrandSkill
The file
Files
Écrire un test
Les tests utilisent Vitest (même configuration que Vite, dans vite.config.ts), jsdom et Testing Library. Les matchers toBeInTheDocument, toHaveClass… sont chargés par src/test/setup.ts.
Où et comment
- Le fichier de test se place à côté du fichier testé :
pricing-card.tsx→pricing-card.test.tsx. - Tester ce que voit et fait l'utilisateur, pas l'implémentation : chercher les éléments par rôle et par texte (
getByRole('button', { name: 'Envoyer' })), interagir avecuserEvent. - Un test = un comportement, avec un nom en français qui le décrit.
Modèle
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, it } from 'vitest'
import { Counter } from './counter'
describe('Counter', () => {
it('augmente la valeur au clic', async () => {
const user = userEvent.setup()
render(<Counter />)
await user.click(screen.getByRole('button', { name: 'Ajouter' }))
expect(screen.getByText('1')).toBeInTheDocument()
})
})Exemples réels dans le projet : src/components/theme-toggle.test.tsx, src/components/copy-command.test.tsx.
Lancer
npm test: une fois (c'est ce que lance la CI).npm run test:watch: en continu pendant le développement.
Pour une correction de bug
Écrire d'abord le test qui reproduit le bug et vérifier qu'il échoue, puis corriger : le test garantit que le bug ne reviendra pas.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

