Skip to content

test: prune low-value tests (getters/accessors, tautologies, no-assertion smoke)#44

Merged
wolpert merged 1 commit into
mainfrom
test/prune-low-value-tests
Jun 9, 2026
Merged

test: prune low-value tests (getters/accessors, tautologies, no-assertion smoke)#44
wolpert merged 1 commit into
mainfrom
test/prune-low-value-tests

Conversation

@wolpert

@wolpert wolpert commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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

  • Whole files: EnumsTest (enum-count tautologies), AdminRequestsTest (record-accessor read-backs)
  • Method-level: accessor / enum-count / no-assertion methods across core spi/config/api, admin-api, refresh-tokens, magic-link, otp, spring, dropwizard
  • Trimmed (kept the real assertion): ResultTypesTest → its two compact-constructor validation guards; RefreshTokenRecordTest equals → the Arrays.equals(tokenHash) case the JVM-generated record equals would get wrong
  • TS: dropped the one admin block fully superseded by the it.each matrix (response-decode blocks kept — they kill return-mapping mutants the matrix can't)
  • e2e: removed the dead readOut helper from all three ceremony specs

What was deliberately kept

Custom equals/hashCode over byte[], 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

  • Affected Java modules pass ./gradlew check — tests + spotless + jacoco gates (core ≥80%, adapters ≥70%). No coverage gate lowered.
  • spring + dropwizard full check incl. Testcontainers integration tests: green
  • Browser SDK vitest: green
  • e2e Playwright specs: only dead code removed (non-behavioral); not run locally (needs Chrome + running demo)

Follow-up (not in this PR)

The three e2e ceremony.spec.ts files are byte-identical except their describe title (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

…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>
@wolpert
wolpert merged commit a0290e9 into main Jun 9, 2026
4 checks passed
@wolpert
wolpert deleted the test/prune-low-value-tests branch June 9, 2026 14:34
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