unit-test — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited unit-test (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are assisting with Vitest unit tests for primereact-mcp, an unofficial MCP server for PrimeReact. Parse the optional argument after /unit-test and act accordingly.
| Invocation | Action |
|---|---|
/unit-test | Run the full test suite and report results |
/unit-test --coverage | Run with V8 coverage and show the summary |
/unit-test --watch | Start Vitest in watch mode |
/unit-test --generate | Find untested functions and generate new test files |
/unit-test --generate <name> | Generate tests specifically for the named function |
/unit-test --ci | Show the GitHub Actions workflow status / help debug it |
npm test # run once
npm run test:watch # watch mode
npm run test:coverage # with v8 coverageAfter running, report:
generate-data.mjstest/
unit/ # Pure-function tests — no file I/O, no PrimeReact dependency
capitalize.test.mjs
extractModuleDescription.test.mjs
extractInterfaceBody.test.mjs
parseProps.test.mjs
buildBasicJsx.test.mjs
buildSections.test.mjs
integration/ # I/O-bound tests using fixture .d.ts files
processComponent.test.mjs
dataIntegrity.test.mjs # validates components-data.json schema
fixtures/ # Synthetic .d.ts files — NOT real PrimeReact files
button/button.d.ts
dialog/dialog.d.ts
nojsdoc/nojsdoc.d.tsSource under test: generate-data.mjs (exports: capitalize, extractModuleDescription, extractInterfaceBody, parseProps, buildBasicJsx, buildSections, processComponent).
When asked to generate tests (--generate or --generate <name>):
generate-data.mjs and list its exported functions.test/unit/ and test/integration/ for existing coverage..test.mjs file:Unit tests (test/unit/<functionName>.test.mjs):
../../generate-data.mjsIntegration tests (test/integration/):
processComponent.test.mjs — tests processComponent(name, fixturesDir) with fixture filesdataIntegrity.test.mjs — validates the schema of components-data.jsonFixture files (test/fixtures/<name>/<name>.d.ts):
.d.ts files that mimic PrimeReact's structure/** ... */ module-level JSDoc block (or intentionally omit one to test the null path)<Name>Props interface with a mix of plain props and event callbacksStandard import pattern for all test files:
import { describe, test, expect, beforeAll } from 'vitest';
import { functionName } from '../../generate-data.mjs';These rules keep tests green after running npm run generate with any PrimeReact version:
toBeGreaterThan(0)'10.9.8' — use toMatch(/^\d+\.\d+\.\d+/)"on", props exclude "children", etc.The GitHub Actions v11-compat job (.github/workflows/test.yml) automatically installs primereact@next, regenerates the data, and re-runs all tests with continue-on-error: true. Once v11 is stable, change PRIMEREACT_VERSION: next → '11' and remove continue-on-error.
generate-data.mjsWhen a new exported function is added to generate-data.mjs:
test/unit/<newFunctionName>.test.mjsnpm test to confirm the new tests passnpm run test:coverage to verify coverage improved~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.