test: prune low-value tests (getters/accessors, tautologies, no-assertion smoke)#44
Merged
Merged
Conversation
…tion smoke) Audited the full suite (102 Java files + browser SDK + e2e). Removed tests that exercise nothing but JVM-generated record accessors, enum-constant-count tautologies, config defaults that merely restate their own constants, and smoke tests with no assertions. Kept everything that encodes real behavior (custom equals/hashCode over byte[], compact-constructor validation, base64url wire mapping, sealed-result -> HTTP mapping, DB round-trips, atomic-claim races). - delete EnumsTest, AdminRequestsTest (whole files: accessor/enum-count only) - drop accessor/enum-count/no-assertion methods across core spi/config/api, admin-api, refresh-tokens, magic-link, otp, spring, dropwizard - trim ResultTypesTest to its two compact-constructor validation guards - trim RefreshTokenRecord equals test to the Arrays.equals(tokenHash) case the JVM-generated record equals would get wrong - TS: drop the one admin block fully superseded by the it.each matrix; the response-decode blocks stay (they kill return-mapping mutants the matrix can't) - e2e: remove dead readOut helper from all three ceremony specs All affected modules pass ./gradlew check (tests + spotless + jacoco gates, core >=80%, adapters >=70%); browser SDK vitest green. No coverage gate lowered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A 7-reviewer audit of the entire test suite (102 Java files + browser SDK + 3 e2e specs) to remove low-value tests — ones that exercise nothing but JVM-generated record accessors, enum-constant-count tautologies, config defaults that restate their own constants, or smoke tests with no assertions.
Two whole modules (core logic/ceremony, persistence) came back with zero deletions — the cuts are concentrated in record/DTO/config "shape" tests. Net: ~370 LOC removed, 17 files (2 deleted outright).
What was removed
EnumsTest(enum-count tautologies),AdminRequestsTest(record-accessor read-backs)spi/config/api, admin-api, refresh-tokens, magic-link, otp, spring, dropwizardResultTypesTest→ its two compact-constructor validation guards;RefreshTokenRecordTestequals → theArrays.equals(tokenHash)case the JVM-generated record equals would get wrongit.eachmatrix (response-decode blocks kept — they kill return-mapping mutants the matrix can't)readOuthelper from all three ceremony specsWhat was deliberately kept
Custom
equals/hashCodeoverbyte[], compact-constructor validation, base64url no-padding wire mapping, sealed-result→HTTP mapping, DB round-trips (Testcontainers), and atomic-claim race semantics. Given this repo's StrykerJS discipline, anything that kills a mutant stayed.Validation
./gradlew check— tests + spotless + jacoco gates (core ≥80%, adapters ≥70%). No coverage gate lowered.checkincl. Testcontainers integration tests: greenFollow-up (not in this PR)
The three e2e
ceremony.spec.tsfiles are byte-identical except theirdescribetitle (180 LOC each). Extracting a shared parameterized flow is recommended but left out here — it spans three separate Playwright projects and needs the Chrome/e2e environment to validate.🤖 Generated with Claude Code