From e2f373ff05116d4b2ed48d4ddcaea8c47846f105 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 30 Apr 2026 10:30:32 -0500 Subject: test(prog): drop ignore-errors on prog-module require, add featurep check Two small tightening passes on the formatter wiring tests just shipped. Drops `(ignore-errors ...)` from each test file's `(require 'prog-PKG)' call. Soft use-package warnings (e.g. lsp-pyright not being installed) still emit messages without aborting the load. A hard load failure (syntax error, missing required dep) would now surface as a test error rather than being silently swallowed. Adds a `(should (featurep PKG))' assertion per language so the test output makes "package loaded" visible alongside the fboundp and binding checks. For webdev the assertion is `(featurep 'prog-webdev)' since the formatter command is defined directly in prog-webdev.el (it shells out to the prettier CLI, no separate package to load). 17 tests total now (up from 13), all passing. --- tests/test-prog-webdev--format-wiring.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/test-prog-webdev--format-wiring.el') diff --git a/tests/test-prog-webdev--format-wiring.el b/tests/test-prog-webdev--format-wiring.el index 7d9914f2..43cfe945 100644 --- a/tests/test-prog-webdev--format-wiring.el +++ b/tests/test-prog-webdev--format-wiring.el @@ -22,7 +22,15 @@ (require 'testutil-format-wiring) (format-test--ensure-packages-init) -(ignore-errors (require 'prog-webdev)) +(require 'prog-webdev) + +(ert-deftest test-prog-webdev-format-package-loaded () + "Normal: `prog-webdev' is in `features' after load. +The webdev formatter is a custom function defined in prog-webdev +itself, so this asserts the module loaded rather than a separate +formatter package (there isn't one — `cj/webdev-format-buffer' +shells out to the `prettier' CLI directly)." + (should (featurep 'prog-webdev))) (ert-deftest test-prog-webdev-format-command-fboundp () "Normal: `cj/webdev-format-buffer' is fboundp from prog-webdev." -- cgit v1.2.3