The wall-framing takeoff writes a shop drawing per wall, as HTML and as a hand-built PDF with no library. Until now they were tested on the example house and one 133 ft wall. A crew would print them, so a malformed file matters.
drawings-fuzz.test.mjs draws up to 150 seeded random plans (one to four walls, 2x4 or 2x6, 16 or 24 in spacing, random doors and windows, labels containing < and &, optional shop-panel limit, panel sheets and sheathing weight). For each it checks:
- one HTML sheet per wall at least, balanced
<svg>tags, noNaN,undefinedorInfinity, labels escaped; - every member has a mark and the parts table adds up to the member count;
- the PDF starts with
%PDF-, ends with%%EOF, itsstartxrefpoints at thexreftable, and it has at least one page per wall.
Result: it passed on the first run (about 10 s), over more than 100 valid plans. No bug found. That says the writers are robust on machine-generated plans; it does not say the layout looks right on a plotter or an architect's real house, which is still untested (see the README).