aboutsummaryrefslogtreecommitdiff
path: root/tests/test-prog-webdev-format.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-13 18:22:54 -0500
committerCraig Jennings <c@cjennings.net>2026-05-13 18:22:54 -0500
commitfdf296c4d0f6d6120d63b36a0bd638fdfd5f1922 (patch)
tree6d84f50f67c62bb98d6a5b7718ceeb157a6ef1df /tests/test-prog-webdev-format.el
parent181722091d37c65b8a402ebc3177cf83c46ab82c (diff)
downloaddotemacs-fdf296c4d0f6d6120d63b36a0bd638fdfd5f1922.tar.gz
dotemacs-fdf296c4d0f6d6120d63b36a0bd638fdfd5f1922.zip
test(ai-config): cover auth-source, api-key caching, context, clear-buffer
The big-module coverage push starts with ai-config (was 53/191, 27.7%). New test file covers seven helpers that don't depend on a live gptel install: - `cj/auth-source-secret`: returns string secrets, funcall's function secrets, errors on missing. - `cj/anthropic-api-key` / `cj/openai-api-key`: cache the result so subsequent calls don't re-hit auth-source. - `cj/gptel--add-file-to-context`: adds existing files, skips nil and missing paths. - `cj/gptel-clear-buffer`: erases in a gptel-org buffer and reinserts the fresh prefix; no-ops + messages elsewhere. - `cj/gptel-context-clear`: three cond branches (`remove-all`, `clear`, alist-fallback) with appropriate `fboundp` stubs. - `cj/gptel-insert-model-heading`: inserts at the response-begin position with the backend/model heading. External primitives (`auth-source-search`, `gptel-add-file`, `gptel-context-remove-all`, etc.) are stubbed. The fallback test declares `gptel-context--alist` as a top-level `defvar` so `setq` inside the function reaches the dynamic binding under lexical scoping.
Diffstat (limited to 'tests/test-prog-webdev-format.el')
0 files changed, 0 insertions, 0 deletions