
> essential-tools-source-kit@1.0.0 test
> node --import tsx --test tests/tools/*.test.ts

✔ every documented CLI command works with the source kit alone (30583.6069ms)
✔ document: the independently specified half-up fixture totals exactly 840.00 (8.5112ms)
✔ document: rounds each line before summing and handles zero/full discount without compounding tax (0.5657ms)
✔ document: hidden pricing is absent from data, calculations, template and PDF inputs (3.362ms)
✔ document: all templates and page sizes produce strict, reusable, JSON-compatible models (8.2503ms)
✔ document: rejects invalid numbers, dates, excessive discounts and unsafe or unsupported imported values (7.1572ms)
✔ document: accepts a bounded PNG signature and rejects SVG, remote, type-spoofed, truncated and oversized images (4.0514ms)
✔ document PDF: all three templates, both page sizes, accented text and pricing rules survive real pdfme generation (7252.7911ms)
✔ document PDF: unsupported glyphs explain the failure while JSON preserves the original draft (4.5885ms)
✔ document PDF: 60 long line items and French notes paginate without losing the final item or notes (496.5344ms)
✔ actual Mermaid engine renders all examples, safe characters, sequence diagrams and real exports (3152.2511ms)
✔ SVG sanitization removes active elements, handlers, external markers and arbitrary CSS (211.0895ms)
✔ portable flowchart labels remain centred inside their nodes after renderer CSS is removed (1330.6821ms)
✔ source editing keeps last valid preview, disables stale exports and recovers the preserved graph (2104.8799ms)
✔ keyboard form edits, local draft opt-in, revision handling and 390px layout work (1931.7754ms)
✔ unsupported glyphs give an actionable error while editable data remains exportable (1183.1222ms)
Process Mapper 100-node/200-edge render: 1171 ms, 215×10066, 914452 SVG bytes.
✔ a measured 100-node / 200-edge process renders within the output boundary (1441.6704ms)
✔ all four business examples validate and compile deterministically (7.0318ms)
✔ business-process loops are accepted without planner dependency rules (0.8984ms)
✔ duplicate IDs, dangling connections and blank step names are rejected (2.4735ms)
✔ separate groups and isolated steps produce useful warnings, not false invalidity (0.983ms)
✔ labels cannot add Mermaid statements, HTML, styling or links (0.5319ms)
✔ encoding keeps accented business text and escapes the entity delimiter exactly once (0.286ms)
✔ editing source preserves a recoverable graph without pretending to reverse parse (0.9894ms)
✔ source-only imports without a graph do not fabricate guided data (1.2464ms)
✔ JSON exports reopen losslessly in both editing modes (3.3198ms)
✔ unknown versions, extra configuration and prototype-pollution payloads are rejected (2.7861ms)
✔ malformed, oversized, cyclic and non-plain inputs fail without mutation (1.1034ms)
✔ safe flowchart shapes and labelled arrows are supported (0.3487ms)
✔ sequence participants, notes, loops and messages are supported (0.8132ms)
✔ source-mode security boundary rejects renderer configuration and executable features (0.4184ms)
✔ source limits reject oversized UTF-8 and excessive nodes/connections (1.213ms)
✔ 100 nodes and 200 edges remain an accepted bounded case (4.4828ms)
✔ generated IDs remain stable and collision-free after deletion (0.2663ms)
✔ a publishable JSON Schema identifies both modes and rejects extra keys (5.2873ms)
Planner one-day bar widths: Day 45, Week 20, Month 4.
✔ The actual Frappe bridge uses distinct Day, Week and Month date scales (4419.3788ms)
﹣ Planner production UI, sandbox rendering, date changes and exports (0.3653ms) # SKIP
﹣ Planner mobile, storage failures and invalid imports preserve current data (0.1488ms) # SKIP
✔ PDF font supports English, French, decimal and business punctuation (144.702ms)
✔ unsupported glyphs fail clearly before a misleading PDF is produced (12.2072ms)
✔ generated Planner PDFs reopen and contain separate readable timeline pages (5844.9578ms)
✔ planner independently matches the manager-approved arithmetic fixture (5.7543ms)
✔ task costs round half-up before addition, without floating-point errors (1.8729ms)
✔ zero-cost work, zero hours and zero contingency remain valid (0.6387ms)
✔ all three illustrative templates validate with no schedule conflict (1.0386ms)
✔ one-day tasks count inclusive calendar and working days (0.5193ms)
✔ date-only calendar spans cross DST, year and leap boundaries (0.7481ms)
✔ finish-to-start conflicts warn without silently rescheduling tasks (0.395ms)
✔ self, missing, duplicate and cyclic predecessor links are rejected (0.7569ms)
✔ task order does not change identity, dependencies or budget (0.621ms)
✔ empty plans and duplicate task IDs are rejected (0.9612ms)
✔ invalid numbers, future schema versions and unknown properties are rejected (1.7787ms)
✔ end-before-start and non-existent dates are rejected (0.9923ms)
✔ prototype keys, complex input and excessive task counts are rejected (3.2045ms)
✔ JSON save and reopen preserve decimal values, task IDs and order (0.3862ms)
✔ CSV neutralizes malicious text, quotes commas/newlines and keeps numbers numeric (0.6501ms)
✔ task data cannot smuggle Frappe configuration into JSON import (0.3588ms)
✔ Frappe end callbacks use local date parts without subtracting another day (0.4224ms)
✔ Frappe labels are escaped in a separate rendering copy (0.3989ms)
✔ independent review: century boundaries and large decimal task amounts use calendar and integer expectations (11.1579ms)
✔ independent review: control-prefixed spreadsheet formulas remain inert and imported engine configuration is rejected (8.5026ms)
✔ independent review: guided delimiters stay text and source mode forbids resources and executable directives (1.3882ms)
﹣ independent review browser: restore never opts into storage and only an editable JSON save clears unsaved-work protection (0.3715ms) # SKIP
﹣ independent review browser: edits during delayed PDF generation are preserved and an outdated PDF is not downloaded (0.1652ms) # SKIP
ℹ tests 64
ℹ suites 0
ℹ pass 60
ℹ fail 0
ℹ cancelled 0
ℹ skipped 4
ℹ todo 0
ℹ duration_ms 30783.3563
