aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-noter-config--predicates.el
Commit message (Collapse)AuthorAgeFilesLines
* test(org-noter-config): cover preferred-split, slug, template, predicatesCraig Jennings2026-04-301-0/+125
Four new test files for the pure-and-near-pure helpers in org-noter-config.el. The interactive heavyweights (cj/org-noter-start, cj/org-noter-insert-note-dwim, cj/org-noter--toggle-notes-window, cj/org-noter--find-notes-file, cj/org-noter--create-notes-file) are out of scope for this pass — they need org-noter loaded and a real session, or a substantial internal/wrapper split before they can be tested without spinning up real PDFs and EPUBs. - preferred-split: 5 tests walking the 1.4 width-to-height threshold from both sides plus a square-frame boundary. - title-to-slug: 7 tests covering multi-word, single-word, mixed punctuation, leading/trailing junk, collapsed runs, digits, and empty input. - generate-notes-template: 5 tests with org-id-uuid mocked, asserting the rendered template carries the UUID, the dual ROAM_REFS / NOTER_DOCUMENT pointers, the title-and-category lines, the ReadingNotes filetag, and the trailing Notes heading. - predicates: 13 tests covering cj/org-noter--in-document-p, cj/org-noter--in-notes-file-p, cj/org-noter--session-active-p, cj/org-noter--get-document-path, and cj/org-noter--extract-document-title. Mocks derived-mode-p, org-entry-get, and buffer-file-name at the boundary so the suite doesn't require pdf-tools or nov. The require chain in each test file is user-constants → keybindings → org-noter-config because cj/org-noter-notes-directory captures roam-dir from user-constants and the prefix-map binding at the bottom of org-noter-config references cj/custom-keymap. 30 new tests, all passing. Full suite green.