Skip to content

test: cover lease PDF normalize, open-ended overlap, payroll parse - #78

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-326c
Closed

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-326c

Conversation

@cursor

@cursor cursor Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • Native VA lease PDF defaults / zero-rent coalescing and unsafe filename sanitization (normalizeLeaseData, safeFilePart, formatDate)
  • Open-ended leases (end_date null/empty) counting toward house-cover active-tenant math
  • Boots-on-site "other work" amount parse ($0.50 floor, $/comma strip, cent rounding) + Cash App pay labels
  • Norfolk TZ visit month keys near UTC month boundaries + leftover status edges
  • Monthly rent invoice currentMonthStart / currentMonthEnd (leap/short months, TZ=UTC)

Test files added/updated

  • scripts/test-native-lease-pdf-normalize.js
  • scripts/test-native-lease-doc-helpers.js (+ pure extract src/services/native-lease-doc-helpers.js)
  • scripts/test-leases-overlap-open-ended.js
  • scripts/test-site-visit-other-work-parse.js
  • scripts/test-site-visit-month-keys.js
  • scripts/test-rent-billing-month-bounds.js
  • package.json scripts for the above

Why this reduces regression risk

These paths sit under lease PDFs, utility house-cover splits, associate payroll CTAs, visit month grouping, and rent invoicing — high blast radius if defaults, open-ended dates, money parse, or calendar bounds drift. Suites are deterministic (no DB/Stripe) and unique vs open coverage drafts #30#77.

Validation

npm run test:native-lease-pdf-normalize
npm run test:native-lease-doc-helpers
npm run test:leases-overlap-open-ended
npm run test:site-visit-other-work-parse
npm run test:site-visit-month-keys
npm run test:rent-billing-month-bounds

All passed locally.

Open in Web View Automation 

Add deterministic unit tests for native lease PDF/filename helpers,
open-ended house-cover lease overlap, Boots-on-site other-work amount
parsing, Norfolk visit month keys, and rent invoice month bounds.

Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants