← ClaudeAtlas

test-nondeterminismlisted

Inject nondeterminism — clocks, random sources, environment, filesystem, and UI media features. Use when a test needs to control time, randomness, viewport-dependent behaviour, or accessibility preferences.
ecoma-io/touchstone · ★ 1 · AI & Automation · score 60
Install: claude install-skill ecoma-io/touchstone
# Nondeterminism Base principles: [test-isolation-base](../test-isolation-base/SKILL.md) Clocks, random sources, environment, and the filesystem enter through a parameter or a constructor. A test that has to freeze global time is paying for a design decision made elsewhere. A rendered interface has a second set of nondeterminism sources, read from the machine rather than passed in: the viewport, the colour scheme, and the accessibility preferences the browser exposes as media features. Set them explicitly in the test, for the same reason you set the clock — unset, the assertion encodes whichever preferences the machine that ran it happened to have. Measured: under one runner's emulation, `prefers-reduced-motion: reduce` took a transition from 0.4s to 0s, and `forced-colors: active` replaced the background outright. Per-language: [TypeScript](references/typescript.md)