Spaces:
Paused
Paused
Commit History
-
Tier 3d: one DOM test double, not nine
Claude +1: Claude Opus 5Unverified signatureEight test files each grew their own `class FakeElement extends EventTarget` — hud, hudSelection, observer, overlays, saveload, starmap, techChart, update — plus four copies of the same no-op-Proxy fakeCtx and eight copies of a byte-identical fakeDocument. They were ~90% the same code, and the 10% that differed was not a considered difference: it was whichever subset of the DOM the file that copied it happened to need that week. overlays' copy tracked parents so `.remove()` really spliced and hudSelection's did not; hud's querySelector walked the tree and update's was hardcoded to null; observer's getBoundingClientRect returned a real 800x600 box and saveload's returned zeros; saveload's appendChild discarded its argument outright. A test written against a weak copy silently asserts less than the identical test written against a strong one, and nothing told you which one you had landed on. test/_dom.js is the union with the strongest implementation of each member. Two things stay conf…f9e883b