Test Unslop
Verified creator: @fikrifirmanf signed in with the GitHub account that owns this repository. It is not a safety check.
Find ineffective tests, run the available suite, and report whether tests actually executed.
MCP configuration
Copy into a client that accepts mcpServers JSON. Other clients may use a different configuration format.
{
"mcpServers": {
"test-unslop": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Use this in your own environment. Copying text here does not run it.
How to use it
- Open the project documentation and choose the instructions for your AI client.
- Copy the configuration and companion skill command if needed.
- Configure the tools in your own environment, then try the example request.
SKILL.md
The instructions your assistant reads, from fikrifirmanf/test-unslop-mcp/skills/test-unslop/SKILL.md. Its authors wrote it, so read it before you install.
name: test-unslop description: Enforces tests that fail when the code is wrong and eliminates fake, tautological or flaky AI-written tests (JS/TS with Jest/Vitest/node:test/Playwright, Python pytest/unittest, Go, Rust, Swift XCTest/Swift Testing, Kotlin/Java JUnit). Trigger whenever writing, fixing or reviewing tests, or before claiming that tests pass.
Test Anti-Slop Protocol
A test exists to fail when behaviour breaks. AI-written tests often cannot fail: they render a component and assert nothing, compare a value with itself, or mock the unit under test. Then the agent reports "all tests pass" after a run that executed zero tests.
1. Every test can fail (HARD RULES)
- Assert on behaviour: each test checks an output, a state change, a rendered result, an emitted call or a thrown error. Rendering or calling without asserting is not a test.
- No tautologies: never
expect(true).toBe(true),expect(x).toEqual(x),assert True,assertTrue(true). - Assert the value, not existence: prefer
toEqual({...})ortoBe(3)overtoBeDefined(),toBeTruthy()oris not None. - Prove it: for new tests, briefly break the code under test (or invert the expectation) and confirm the test fails, then restore it.
- Never weaken an assertion, delete a test, or add
.skipjust to get green. Fix the code or tell the user the test exposes a bug.
2. Failures must surface (HARD BANS)
- No
try { ... } catch {}around assertions; useexpect(() => f()).toThrow()orpytest.raises. - Always
await(orreturn)expect(promise).rejects/resolves; an un-awaited one never runs. - No
.only/fit/fdescribeleft in the code. - Skips carry a reason and a link:
@pytest.mark.skip(reason="needs GPU, see #42").
3. Deterministic and hermetic
- No fixed sleeps (
setTimeoutpromises,time.sleep,waitForTimeout). Use fake timers,findBy/waitFor, or await the event. - No real external network in unit tests: stub with MSW, nock, respx,
httptestor a local server. - No unseeded randomness or wall-clock dependence: fixed data, seeded faker, frozen time.
- Each test sets up its own state; order must not matter.
4. Test the right thing
- Mock at the boundary (network, clock, filesystem, payment provider), not your own modules. More than a handful of module mocks means you are testing the mocks.
- Cover the edge cases that matter: empty input, boundaries, invalid input, error paths, concurrency where relevant.
- Snapshots supplement explicit assertions; they do not replace them.
- UI tests query by role and accessible name (
getByRole('button', { name: 'Save' })), not CSS classes or test ids, where possible. - Name tests after the behaviour:
rejects expired coupons, nottest1orworks.
5. Mandatory verification loop
Before claiming a testing task (or any task that changed tested code) is complete:
- Call
audit_test_slopwith the modified test files (omitfilesto audit git changes). - Call
find_missing_testswith the changed source files and add tests for uncovered logic, or tell the user why none are needed. - Call
run_tests. Report the real result:FAILmeans fix; zero tests run is aFAIL;SKIPPEDmeans the runner is missing and tests did not run. Never claim "tests pass" without aPASSfrom this tool. - Suppress a verified false positive with
// unslop-ignore RULE_ID -- reason; a suppression without a reason is an ERROR.
Other setup options
Companion skill command
Run on your own machine if you want to install the companion skill.
npx -y [email protected] install-skills
Example request
Review the changed tests with test-unslop. Check meaningful assertions, focused or skipped tests, asynchronous failures, and excessive mocking. Run the suite and report the actual result.
Example results
Illustrative example
Review outline - Assert a meaningful output or state change. - Check focused test flags and unawaited assertions. - Review mocks at external boundaries. - Report executed test counts and any failures without claiming skipped checks passed.
Illustrative response outline, not a recorded run.
Illustrative examples show a possible response format. They are not recorded runs or verified results. Actual responses will vary.
Security checks
Automated checks, last run Nov 9, 2026. They can miss problems and do not guarantee a listing is safe. Read the source and what you are asked to run before you use it.
4 of 4 checks passed
- PassedSetup commands and descriptionLayer 1
The install commands and description match none of the risky patterns we look for.
Source: AIWantsThis screening rules
- PassedInstall scripts and package statusLayer 2
The npm package runs no code at install time and is not deprecated.
Source: npm registry
- PassedKnown vulnerabilities in the packageLayer 2
OSV.dev lists no advisories for this package.
Evidence (1)
- [email protected]
- No advisories listed in OSV.dev.
Source: OSV.dev
- PassedSource repositoryLayer 2
The repository is public, not archived and has recent activity.
Evidence (3)
- Last push
- 2026-10-22
- Archived
- no
- License
- MIT
Source: GitHub