Skip to content

test: drop tests that repeat another's code path, cover the untested ones - #27

Merged
maxholman[bot] merged 1 commit into
masterfrom
test/dedupe-and-cover-gaps
Sep 27, 2026
Merged

maxholman[bot] merged 1 commit into
masterfrom
test/dedupe-and-cover-gaps

Conversation

@maxholman

@maxholman maxholman Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

A coverage audit found tests that exercise the same code as another test and assert the same thing. Most came from running each query style through behaviour that is settled before any style-specific code runs, and from repeating what the serializer tests already show through the client. They made the suite slower to read and hid what each style actually decides. Where a case depends on a style, such as an empty array, where query-string's handling differs by array format, every style keeps its own test.

The same audit found code that no test reached: validation of async schemas and of pending values, the client's custom response validator refusing a body, error details carried over from a response body, a command's JSON and string forms, and a request body sent through the real fetcher. The body test also covers bytes backed by shared memory, which fetch would otherwise send as a comma-separated list of numbers. That test fails if the copy that prevents this is removed.

…ones

Co-Authored-By: LLM <noreply@maxholman.dev>
@maxholman
maxholman Bot merged commit fc5e4b5 into master Sep 27, 2026
5 checks passed
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