Skip to content

Fix tests that assert the wrong thing - #93

Merged
jstayton merged 1 commit into
developmentfrom
fix-incorrect-test-assertions
Aug 27, 2026
Merged

jstayton merged 1 commit into
developmentfrom
fix-incorrect-test-assertions

Conversation

@jstayton

Copy link
Copy Markdown
Contributor

Each of these tests passed while asserting something other than what its
name claimed, so a regression in the code under test wouldn't have failed
the suite. Every case was confirmed by a mutation that survived the full
suite before this change and fails after it.

The page parser's string branch was unreachable: parse() validates first,
and Joi coerces a numeric string to a number. The operand dates to the
initial commit and was carried through the is removal mechanically.
Removing it leaves coverage at 100%.

The validator tests now assert the validated values in the returned map,
rather than only that a Map came back. That write-back is what turns
filter[x][is]=null into SQL is null. Page write-back still needs an
end-to-end assertion, which is tracked separately along with the rest of
the missing coverage found in the same audit.

🤖 Generated with Claude Code

Each of these tests passed while asserting something other than what
its name claimed, so a regression in the code under test wouldn't have
failed the suite. Every case was confirmed by a mutation that survived
the full suite before this change and fails after it.

The page parser's string branch was unreachable: `parse()` validates
first, and Joi coerces a numeric string to a number. The operand dates
to the initial commit and was carried through the `is` removal
mechanically. Removing it leaves coverage at 100%.

The validator tests now assert the validated values in the returned
map, rather than only that a `Map` came back. That write-back is what
turns `filter[x][is]=null` into SQL `is null`. Page write-back still
needs an end-to-end assertion.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jstayton
jstayton merged commit 839632c into development Aug 27, 2026
4 checks passed
@jstayton
jstayton deleted the fix-incorrect-test-assertions branch August 27, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant