Outcome
Add a focused Vitest fixture that proves a formula-backed WorkPaper keeps computed display readback after the document is exported, serialized, parsed, and restored.
Likely files
packages/headless/src/__tests__/initial-sheet-load.test.ts, or a new focused test under packages/headless/src/__tests__/
packages/headless/src/index.ts for public API names only
Suggested approach
Build a tiny workbook with WorkPaper.buildFromSheets(), edit one input with setCellContents(), read a formula cell with getCellValue() and getCellDisplayValue(), then round-trip through exportWorkPaperDocument(), serializeWorkPaperDocument(), parseWorkPaperDocument(), and createWorkPaperFromDocument().
Keep the fixture small: two sheets, one edited input, one dependent formula, and assertions that the restored workbook reports the same value and display text.
Acceptance proof
Run:
pnpm exec vitest run packages/headless/src/__tests__/initial-sheet-load.test.ts
If you add a new test file, run that file instead. The proof should include a restored formula cell whose numeric value and display value match the post-edit workbook.
Scope check
- This should be reviewable in one sitting.
- Do not change public APIs.
- Do not add broad formula-engine behavior; this is a public
@bilig/headless round-trip fixture only.
Outcome
Add a focused Vitest fixture that proves a formula-backed
WorkPaperkeeps computed display readback after the document is exported, serialized, parsed, and restored.Likely files
packages/headless/src/__tests__/initial-sheet-load.test.ts, or a new focused test underpackages/headless/src/__tests__/packages/headless/src/index.tsfor public API names onlySuggested approach
Build a tiny workbook with
WorkPaper.buildFromSheets(), edit one input withsetCellContents(), read a formula cell withgetCellValue()andgetCellDisplayValue(), then round-trip throughexportWorkPaperDocument(),serializeWorkPaperDocument(),parseWorkPaperDocument(), andcreateWorkPaperFromDocument().Keep the fixture small: two sheets, one edited input, one dependent formula, and assertions that the restored workbook reports the same value and display text.
Acceptance proof
Run:
pnpm exec vitest run packages/headless/src/__tests__/initial-sheet-load.test.tsIf you add a new test file, run that file instead. The proof should include a restored formula cell whose numeric value and display value match the post-edit workbook.
Scope check
@bilig/headlessround-trip fixture only.