Test
Use when the user wants to run the Pinta test suite (Vitest) — runs unit tests for the Chrome extension and companion server. Accepts an optional workspace name (`extension` or `companion`) to scope the run; defaults to running both.From its SKILL.md
npx -y skills add kevzlou7979/pinta --skill testAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.7 KB, as published. Nobody here has run it
test
Runs the Vitest suites for Pinta. Two workspaces have tests today:
extension— pure-logic unit tests underextension/src/**/*.test.tscompanion— Node-side unit tests undercompanion/src/**/*.test.ts
1. Sanity check the working directory
test -f package.json && grep -q '"name": "pinta"' package.json && echo "OK in pinta repo" || { echo "ERROR: run /test from the pinta repo root"; exit 1; }
If that fails, ask the user to cd into their pinta clone and re-invoke.
2. Pick the scope
Look at the user's argument to /test:
/test(no arg) — run every workspace's tests vianpm testat the repo root./test extension— run just the extension suite./test companion— run just the companion suite./test <pattern>— anything else: pass the argument through as a Vitest file/test filter to the root run, e.g.npm test -- <pattern>. (Vitest treats positional args as a file name regex.)
3. Run
Default (both workspaces):
npm test
Single workspace:
npm run test --workspace @pinta/extension # or
npm run test --workspace pinta-companion
With a filter (forwarded to Vitest in every workspace that has a
test script):
npm test -- url-patterns
Watch mode is intentionally NOT exposed through /test — it would
hang the agent. If the user asks to watch, tell them to run
npm run test:watch --workspace @pinta/extension (or the companion
equivalent) themselves in a separate terminal.
4. Report
- On success: report total file + test counts per workspace
(Vitest prints a summary like
Test Files 1 passed (1)/Tests 14 passed (14)). - On failure: surface the first failing test's name, file, and the assertion error. Don't try to fix the failure — just report it unless the user asks for a fix.
Notes
- Vitest config lives at
extension/vitest.config.tsandcompanion/vitest.config.ts. Both currently use thenodeenvironment. If we add Svelte component tests later, the extension config will needenvironment: "jsdom"and the@sveltejs/vite-plugin-svelteplugin. - The extension's
vitest.config.tsis intentionally separate fromvite.config.tsbecause the CRX plugin in the latter requires a manifest entry that breaks under Vitest's loader. - If the user adds tests in
shared/,adapters/, orskill/, those workspaces would also need atestscript and avitest.config.tsbeforenpm testwill pick them up.