Commit graph

5 commits

Author SHA1 Message Date
Barrett Ruth
114048298b 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
0ede508af8 test: update priority format assertions from ! to [N]
Problem: fc4a47a changed the priority display format from '! ' to
'[N] ' in views.lua and diff.lua but left two existing test
assertions and their descriptions using the old format, causing
both to fail.

Solution: update the input line in diff parse_buffer test, update
the expected string and description names in views category_view
test, and rename the diff.apply description to match the new idiom.
2026-02-24 22:32:14 -05:00
39c98012d0 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.
2026-02-24 19:57:21 -05:00
53ab1cc000 feat: rename 2026-02-24 15:21:44 -05:00
8bd6bf8a6a test: add store, parse, and diff specs
Problem: need test coverage for core data operations, inline
metadata parsing, and buffer diff algorithm.

Solution: add busted specs for store CRUD, round-trip
preservation, parse body/command_add with configurable date
syntax, and diff create/delete/update/copy/move operations.
2026-02-24 15:10:09 -05:00