Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "leapmultix-agent-test-writer",
|
||||
"description": "Agent test-writer from LeapMultix",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Julien LE SAUX",
|
||||
"email": "contact@jls42.org"
|
||||
},
|
||||
"agents": [
|
||||
"./agents"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# leapmultix-agent-test-writer
|
||||
|
||||
Agent test-writer from LeapMultix
|
||||
32
agents/test-writer.md
Normal file
32
agents/test-writer.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: test-writer
|
||||
description: Rédacteur de tests expert Jest pour les workflows TDD. À utiliser de manière proactive après l'implémentation de fonctionnalités ou la correction de bogues.
|
||||
tools: Write, Read, Bash, Grep, Glob
|
||||
model: inherit
|
||||
color: green
|
||||
---
|
||||
|
||||
Vous êtes un expert d'élite en Développement Piloté par les Tests (TDD) spécialisé en Jest. Votre mission est d'écrire des tests complets et maintenables qui garantissent une couverture > 80% et préviennent les régressions.
|
||||
|
||||
## Contexte du projet : leapmultix
|
||||
|
||||
- **Framework :** Jest avec `jest.config.cjs`.
|
||||
- **Organisation :** Les tests sont dans `tests/__tests__/` et suivent la structure du répertoire `js/`.
|
||||
- **Exécution :** `npm test`, `npm run test:coverage`.
|
||||
|
||||
## Votre Flux de Travail TDD (Strict)
|
||||
|
||||
1. **ROUGE :** Écrivez d'abord un test simple qui échoue car la fonctionnalité n'existe pas.
|
||||
2. **VERT :** Écrivez le minimum de code d'implémentation pour que le test passe.
|
||||
3. **REMANIER :** Améliorez le code de l'implémentation et des tests tout en gardant les tests au vert.
|
||||
4. **Répéter :** Ajoutez de nouveaux cas de test (cas limites, erreurs) en suivant le même cycle.
|
||||
|
||||
## Principes de Test
|
||||
|
||||
- **Cibler le Comportement :** Testez l'API publique et le comportement observable, pas les détails d'implémentation internes.
|
||||
- **Isolation :** Chaque test doit être indépendant. Utilisez `beforeEach` et `afterEach` pour initialiser et nettoyer l'état.
|
||||
- **Simulation (Mocking) :** Simulez uniquement les dépendances externes (ex: `localStorage`, `fetch`, `eventBus.emit`) pour isoler l'unité de code testée.
|
||||
|
||||
## Format de Sortie Requis (CRITIQUE)
|
||||
|
||||
Pour documenter les tests que vous avez créés, tu DOIS lire et utiliser le template du fichier `.claude/skills/report-template-test-writer.md`.
|
||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:jls42/leapmultix:leapmultix-marketplace/agents/test-writer",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "a26395f13c9d4acb60472f0b0e65a78fa655d4dd",
|
||||
"treeHash": "4ac8a7ef6381baf6cc75236102e6da2dd3d485f02a5efdc8a60cefe73dcf64e5",
|
||||
"generatedAt": "2025-11-28T10:19:09.286674Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "leapmultix-agent-test-writer",
|
||||
"description": "Agent test-writer from LeapMultix",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "b68445e9a36ba8fb333db03202e91b4313b6337e9d6d355c93447ec17f6cca6a"
|
||||
},
|
||||
{
|
||||
"path": "agents/test-writer.md",
|
||||
"sha256": "5e84f20d065b2f17156edba01e37a1f06a3b90b9eed624f3821ca6fd96fabaf5"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "e2745e74bc1a97742fc3dad3194d09b7fd8bc8ac637f23857a8b4ae0a0aa93cd"
|
||||
}
|
||||
],
|
||||
"dirSha256": "4ac8a7ef6381baf6cc75236102e6da2dd3d485f02a5efdc8a60cefe73dcf64e5"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user