Goal
Add focused unit coverage for the pure poster and paper-size helpers.
Files
- Add
src/lib/paper.test.ts.
- Change
src/lib/paper.ts only if a test exposes a real defect.
Acceptance criteria
paperPt covers A4 conversion plus portrait/landscape dimension swapping using toBeCloseTo.
tileCount covers exact fit, the 0.5 pt tolerance, first overflow, multiple sheets, and overlap increasing the sheet count.
gridFor covers explicit orientation, count === cols * rows, auto-orientation for both tall and wide pages, and deterministic portrait selection on ties.
describeSize recognizes A-series sizes in either orientation and rounds a custom size.
- Tests are pure and need no PDF fixture or Tauri runtime.
Verify
npm test -- src/lib/paper.test.ts
npm run typecheck
Start from development and open the pull request against development. Comment here if you would like the issue assigned.
Goal
Add focused unit coverage for the pure poster and paper-size helpers.
Files
src/lib/paper.test.ts.src/lib/paper.tsonly if a test exposes a real defect.Acceptance criteria
paperPtcovers A4 conversion plus portrait/landscape dimension swapping usingtoBeCloseTo.tileCountcovers exact fit, the 0.5 pt tolerance, first overflow, multiple sheets, and overlap increasing the sheet count.gridForcovers explicit orientation,count === cols * rows, auto-orientation for both tall and wide pages, and deterministic portrait selection on ties.describeSizerecognizes A-series sizes in either orientation and rounds a custom size.Verify
npm test -- src/lib/paper.test.ts npm run typecheckStart from
developmentand open the pull request againstdevelopment. Comment here if you would like the issue assigned.