aboutsummaryrefslogtreecommitdiff
path: root/tests/determinism
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-04-22 07:51:18 +0530
committerBobby <[email protected]>2026-04-22 07:51:18 +0530
commit6e8adbaabedba12e81bf0fdfe3dc42108255bd11 (patch)
tree6d0cb2f5d6d029ea93432a1f906ab74bcdfb7917 /tests/determinism
parent22912c4af19b9055ed95779c4d16020fe3a449eb (diff)
downloadhollowdark-6e8adbaabedba12e81bf0fdfe3dc42108255bd11.tar.xz
hollowdark-6e8adbaabedba12e81bf0fdfe3dc42108255bd11.zip
Migrate remaining relative imports to @hollowdark/*; strip //-comments and doc references, JSDoc-only
Diffstat (limited to 'tests/determinism')
-rw-r--r--tests/determinism/rng.test.ts8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/determinism/rng.test.ts b/tests/determinism/rng.test.ts
index 57a1e10..5d003b0 100644
--- a/tests/determinism/rng.test.ts
+++ b/tests/determinism/rng.test.ts
@@ -157,8 +157,6 @@ describe('createRNG — output shape', () => {
])
if (pick === 'rare') lowCount++
}
- // Expected ~5, allow plenty of slack for variance; just confirm the
- // distribution isn't inverted.
expect(lowCount).toBeLessThan(50)
})
@@ -212,15 +210,9 @@ describe('SeededRNG.sub — sub-RNG derivation', () => {
})
describe('byte-level determinism snapshot', () => {
- // Locks the PRNG implementation. Saved worlds depend on exact byte
- // reproduction — if this test breaks, it means the PRNG changed, and
- // every existing save relying on this seed will diverge. Treat failure
- // as a migration concern, not a "just update the snapshot" fix.
test('createRNG("hollowdark").next() × 5 matches canonical sequence', () => {
const rng = createRNG('hollowdark')
const first5 = [rng.next(), rng.next(), rng.next(), rng.next(), rng.next()]
- // Values computed from the current mulberry32 + xmur3 implementation.
- // Reproducible locally via: createRNG('hollowdark').next() × 5.
expect(first5).toMatchInlineSnapshot(`
[
0.14088608953170478,