Skip to main content

claude-workflow-tdd-harness

Reusable Node.js harness for unit-testing Claude Code Workflow scripts (the `Workflow` tool's `.js` files) with `node:test`. Use when: (1) you need to test a Workflow script's args contract / phase order / per-agent schema shape WITHOUT actually invoking the Workflow tool (which spawns real agents, costs tokens, is slow, and is only available in the parent session); (2) `node --test` rejects the file with `SyntaxError: Unexpected token 'export'` or `Illegal return statement` because the script uses top-level `await`, top-level `return`, and injected globals (`agent`, `phase`, `log`, `budget`, `parallel`, `pipeline`, `workflow`); (3) you want a per-label mock-agent dispatch pattern so each `agent()` call can return a different shape; (4) you want budget-gate / short-circuit / phase-order tests to land before any live Workflow call. Ships a ~110-line ESM harness (no deps) that strips `export const meta = {...}` via brace-counting, wraps the body in `AsyncFunction`, injects configurable mocks for all Workflow gl

Aller à l'installation

Informations de source

Dépôt
cajias/claude-skills
Dernière activité de la source
20 juillet 2026 à 07:29
Langue détectée de SKILL.md
anglais
Étoiles
0
Forks
0

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.