Test bodies are not empty or TODO-only
Why it matters
An empty it('creates a user', () => {}) body or one containing only // TODO passes unconditionally in every test runner — it shows green in CI, increments the test count, and contributes nothing. AI coding tools scaffold test stubs frequently and treat them as "complete" once the file is syntactically valid. The downstream effect: the team believes behavior is tested when it isn't, and a growing backlog of TODO-only tests never gets implemented because they never fail to remind anyone. ISO-25010:2011 testability requires that tests verify actual behavior.
Severity rationale
Medium because empty test bodies silently inflate the reported test count and create a false sense of coverage without catching any real defects.
Remediation
Implement or delete every empty or TODO-only test body. Use it.todo() instead of it('name', () => { /* TODO */ }) — it.todo is semantically correct and most runners surface it as a pending test rather than a pass:
// Before: passes silently, zero verification
it('creates a user', () => {})
it('verifies password', () => { /* TODO */ })
// After option A: implement with real assertions
it('creates a user', async () => {
const user = await createUser({ email: 'a@b.com' })
expect(user.id).toBeDefined()
})
// After option B: mark as genuinely pending
it.todo('creates a user') // shown as pending in vitest/jest output, not a pass
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Test Reality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.testability — Testability (maintainability sub-characteristic)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-test-theater·automated