Several tests in the suite use assertions weak enough to let real regressions pass. SeededRNG tests for float, NaN, and Infinity seeds only verify same-seed reproducibility — they never assert the documented uint32 coercion (SeededRNG(42.999) === SeededRNG(42), SeededRNG(NaN | Infinity) === SeededRNG(0)). invalid maxDice falls back to default asserts only .not.toThrow(), so an implementation that silently used Infinity would still pass. nextInt inverted-bounds and trivial-range tests check membership in range but not equivalence to non-inverted bounds or RNG-state preservation. The CLI --verbose test uses three loose toContain checks instead of an exact match against the deterministic seeded output. Two MockRNG exhaustion tests use expect(true).toBe(false) (yielding "expected true to be false" failure messages), and one versus metadata propagation test asserts only result.degree.toBeDefined() instead of the expected DegreeOfSuccess.Failure.
Rationale
These weak assertions reduce the suite to a smoke test for the affected paths — a regression that broke SeededRNG normalization, the maxDice cap, or nextInt state preservation could ship without a failing test. Replacing them with behavior-level checks (exact-match assertions, equivalence between equivalent inputs, state-preservation invariants) restores the suite as a meaningful safety net.
Drafted with AI assistance
Several tests in the suite use assertions weak enough to let real regressions pass.
SeededRNGtests forfloat,NaN, andInfinityseeds only verify same-seed reproducibility — they never assert the documented uint32 coercion (SeededRNG(42.999) === SeededRNG(42),SeededRNG(NaN | Infinity) === SeededRNG(0)).invalid maxDice falls back to defaultasserts only.not.toThrow(), so an implementation that silently usedInfinitywould still pass.nextIntinverted-bounds and trivial-range tests check membership in range but not equivalence to non-inverted bounds or RNG-state preservation. The CLI--verbosetest uses three loosetoContainchecks instead of an exact match against the deterministic seeded output. TwoMockRNGexhaustion tests useexpect(true).toBe(false)(yielding "expected true to be false" failure messages), and oneversusmetadata propagation test asserts onlyresult.degree.toBeDefined()instead of the expectedDegreeOfSuccess.Failure.Rationale
These weak assertions reduce the suite to a smoke test for the affected paths — a regression that broke
SeededRNGnormalization, themaxDicecap, ornextIntstate preservation could ship without a failing test. Replacing them with behavior-level checks (exact-match assertions, equivalence between equivalent inputs, state-preservation invariants) restores the suite as a meaningful safety net.Drafted with AI assistance