Test fixtures
All workbooks here are synthetic: a five-year margin model invented for the tests.
| File | Written by | Purpose |
|---|---|---|
clean.xlsx, reference.xlsx |
make-fixtures.mjs |
A sound model: Inputs, Calc, Outputs, Controls, Doc. No finding expected. |
defects.xlsx |
make-fixtures.mjs |
Planted defects: typed constant at Calc!D3, broken pattern and buried constant at Calc!E4, #REF! at Outputs!B4, #DIV/0! at Outputs!B6 propagating to B7, circular reference Calc!B9 / B10, failing control Controls!E5. |
stale.xlsx |
make-fixtures.mjs |
One stored result (Outputs!B5) that does not follow from its formula. |
nocache.xlsx |
make-fixtures.mjs |
The clean model without any stored result, as a non-calculating library writes it. |
submission.xlsx |
make-fixtures.mjs |
A student answer to reference.xlsx: typed units, one equivalent formula, wrong costs, errors carried forward, one missing output, one scale error. |
features.xlsx |
make-fixtures.mjs |
Reader coverage: shared strings with rich text, shared formulas, number formats, hidden sheet, quoted sheet name, sheet-scoped name, whole-column and whole-row references. |
clean-libreoffice.xlsx |
LibreOffice | nocache.xlsx opened and saved by LibreOffice, which computed the stored results. An external check of the evaluator. |
make-fixtures.mjs uses xlsx-writer.mjs, a minimal deterministic writer that stores a result
next to each formula. Those results are computed in the generator with plain JavaScript
arithmetic, not with the audit engine, so recalculation tests compare two independent
computations. A test asserts the committed files equal the generator's output.
Rebuild:
bash
node test/fixtures/make-fixtures.mjs
# only when the clean model changes:
soffice --headless --convert-to xlsx --outdir /tmp/lo test/fixtures/nocache.xlsx
cp /tmp/lo/nocache.xlsx test/fixtures/clean-libreoffice.xlsxHostile files (malformed archives, decompression bombs, path-traversal entry names) are built in memory by the tests and never committed.