pending.nvim/spec
Barrett Ruth 8e16744ebe
test: add missing coverage (#19)
* test: add top-priority missing test coverage

Problem: several critical code paths had zero test coverage —
parse.resolve_date (relative date resolution), store.snapshot
(foundation of the undo stack), and the diff.apply invariant that
unchanged tasks do not get their modified timestamp bumped. The
diff.apply due/priority clearing paths were also untested.

Solution: add six targeted test blocks across parse_spec, store_spec,
and diff_spec: resolve_date happy/failure paths, parse.body with
relative due tokens, snapshot copy-semantics and deleted-task
exclusion, diff unchanged-modified invariant, due cleared on removal,
priority cleared on ! removal.

* test: add second batch of missing test coverage

Problem: six more gaps from the audit remained after the first batch —
archive persistence verification, diff modified-on-rename, parse_buffer
inline cat:/due: token parsing, and store.update immutability invariants.

Solution: add six it() blocks across archive_spec, diff_spec, and
store_spec: archive unload/reload persistence check, modified timestamp
updated on description change, inline cat: overrides header category,
inline due: token parsed from buffer line, id/entry fields immutable
under store.update, and end timestamp not overwritten on second
completion.
2026-02-24 22:33:13 -05:00
..
archive_spec.lua test: add missing coverage (#19) 2026-02-24 22:33:13 -05:00
diff_spec.lua test: add missing coverage (#19) 2026-02-24 22:33:13 -05:00
helpers.lua test: add store, parse, and diff specs 2026-02-24 15:10:09 -05:00
parse_spec.lua ci: format 2026-02-24 22:32:14 -05:00
store_spec.lua test: add missing coverage (#19) 2026-02-24 22:33:13 -05:00
views_spec.lua test: update priority format assertions from ! to [N] 2026-02-24 22:32:14 -05:00