1.1 KiB
1.1 KiB
pi-test-status
A Pi extension that watches for test runs and shows a pass/fail widget in the Pi UI.
Features
- Detects
vitestandnpm testcommands in bash tool calls - Parses vitest output to determine pass/fail status
- Shows a live widget indicator (● green for pass, ● red for fail)
- Displays the summary line from the test output
Installation
pi install npm:pi-test-status
Or with a scope:
pi install npm:@your-scope/pi-test-status
Development
pi -e ./extensions/index.ts
Or from the package root:
pi -e .
Usage
Once installed, the extension automatically activates when you run tests:
# In Pi, just run your tests — the widget appears automatically
npm test
npx vitest
vitest run
The widget shows:
- Green ● with summary on test pass
- Red ● with summary on test failure
How it works
The extension subscribes to the tool_result event. When a bash tool call matches a test command, it parses the vitest output for pass/fail indicators and updates a Pi widget with the result.
License
MIT