Jarroba Tools · Test audit
v0.3.2Audits tests instead of writing them: what each one really asserts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
test_audit
Audit a test file and say, case by case, what it ACTUALLY checks: which ones assert about a value, which only check that something exists, which assert nothing at all, and which are disabled. Returns the EVIDENCE behind each verdict (the assertions it found) so you can check the checker. TypeScript, JavaScript, Python, Java and Go. Executes nothing. Run it on the tests you just wrote, BEFORE you hand them over: told to "make the tests pass", widening a matcher is cheaper than fixing the bug, and this is what notices.
| Parameter | Type | Description |
|---|---|---|
dialects | array | Your own assertion helpers. If your team has a home-made expect(), declare it here and it will stop coming back as "indeterminate". |
language | string | Required if you pass `text` without `path`. |
path | string | Path to the test file. The language is inferred from the extension. |
text | string | The test file as text. Alternative to `path`. |
test_diff_audit
Compare TWO versions of the same test file and say whether the change STRENGTHENED or WEAKENED the safety net: widened matchers (toBe -> toContain -> toBeGreaterThan), assertions that disappeared, and cases that stopped running. Call it on your own work after touching tests, and above all after fixing a red suite: reaching green by softening an assertion is cheaper than fixing the bug, and this is what catches it. Executes nothing.
| Parameter | Type | Description |
|---|---|---|
after | string | New version, as text. |
afterPath | string | Path to the new version. |
before | string | Previous version, as text. |
beforePath | string | Path to the previous version (e.g. what `git show HEAD:file` produced). |
language | string | Required if you pass the texts without paths. |
test_cases
From a TYPE to the cases worth testing, with no model involved: equivalence partitions and boundary values derived from a TypeScript signature or a JSON Schema. For each parameter it returns the TECHNIQUE that applies and why — boundary values only mean something where there is an ordering, so they are NOT applied to a boolean or an enum. It adds the properties that can be asserted without knowing the domain, plus a fast-check test ready to paste. Use it BEFORE writing the tests, so you do not miss the cases everyone misses.
| Parameter | Type | Description |
|---|---|---|
name | string | Function name for the generated code. Inferred from the signature if you pass one. |
schema | string | JSON Schema (an object with `properties`). Alternative to `signature`. |
signature | string | TypeScript signature, e.g. function calculate(price: number, kind: 'A' | 'B'): number |
test_debt
A project's DISABLED-test debt, WITH ITS AGE. Walks the folder, finds every `it.skip`, `xit`, `@Ignore`, `@pytest.mark.skip` or `t.Skip`, and dates it with `git blame`. None of those cases appears in a coverage report, because as far as the runner is concerned they do not exist: this is the debt nobody measures and the one that lasts longest — disabled 'to fix later', and later never comes. Sorted oldest first, which is what makes it actionable.
| Parameter | Type | Description |
|---|---|---|
folder * | string | Root of the project (or subtree) to review. |
maxFiles | integer | Cap on how many test files to read. |