aboutsummaryrefslogtreecommitdiff
path: root/tests/test-chime-make-tooltip.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor!: collapse three time-left format defcustoms into one alistCraig Jennings2026-05-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | I merged `chime-time-left-format-at-event', `chime-time-left-format-short', and `chime-time-left-format-long' into a single alist `chime-time-left-formats' keyed by `at-event' / `short' / `long'. Three knobs for one feature (countdown display) was unnecessary surface area; one alist is the same flexibility with a third the namespace. `chime--time-left' switched from a pcase-on-variable to a pcase-on-regime that picks an alist key, then `alist-get's the format string. Behavior is identical for default settings. Test setup in the four affected files now builds the alist with `(list (cons 'KEY VAL) ...)' instead of `'(...)'. The literal-quote form returns the SAME cons-cell structure on every evaluation, so a previous test mutating it via `setf' on `alist-get' poisoned later tests. `list' + `cons' produces fresh structure per call, which is what the tests actually need. Migration: `(setq chime-time-left-format-short "in %mm")' becomes `(setf (alist-get 'short chime-time-left-formats) "in %mm")', or a full `(setq chime-time-left-formats '((at-event . ...) (short . ...) (long . ...)))' replacement.
* Fix file headers: correct copyright years, add missing headerCraig Jennings2026-04-041-1/+1
| | | | | New files created in 2026 should have Copyright (C) 2026, not 2024-2026. Add standard copyright/license header to test-bootstrap.el.
* Extract test boilerplate into shared test-bootstrap.elCraig Jennings2026-04-041-28/+15
| | | | | | | | | | All 50 test files that load chime.el repeated the same 8-line initialization block (package-initialize, ert, dash, alert, async, org-agenda, chime load). Replace with a single require of test-bootstrap.el. Also fix test-make-upcoming-item name collision between test-chime-make-tooltip.el and test-chime--deduplicate-events-by-title.el.
* Add 94 tests across 10 new test files and fix 2 bugsCraig Jennings2026-04-041-0/+245
New test coverage for previously untested functions: - filter-day-wide-events, time utilities, day-wide time matching - make-tooltip, event-is-today, get-tags, done-keywords-predicate - extract-title, propertize-modeline-string, warn-persistent-failures - log-silently Bug fixes discovered by new tests: - Fix pluralization in no-events tooltip ("1 hours" -> "1 hour", etc.) - Fix chime--get-tags returning ("") instead of nil for untagged headings