summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-27 00:53:22 -0500
committerCraig Jennings <c@cjennings.net>2025-10-27 01:00:11 -0500
commit7906389719bc2ed53c566837a9586bbbffea4db6 (patch)
tree96586c355cff0652ac5cb956e87f21fcaec1f805
parent440293828363b57fced439cfa927aac2f7c3838a (diff)
feat:test-runner: Enhance ERT test runner with focus/unfocus support
Add comprehensive documentation and workflow details for the ERT test runner, including integration with Projectile projects for automatic test discovery. Refactor code to support focus/unfocus workflows, allowing developers to efficiently manage test execution by focusing on specific test files. Introduce internal utility functions `cj/test--do-*` to modularize logic for file operations and focus management, improving code maintainability. Add new tests in `test-test-runner.el` to validate the enhanced functionality, ensuring robust handling of focus operations and test execution scenarios.
-rw-r--r--modules/test-runner.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/test-runner.el b/modules/test-runner.el
index 79e62e77..125a8d20 100644
--- a/modules/test-runner.el
+++ b/modules/test-runner.el
@@ -66,6 +66,11 @@
(require 'ert)
(require 'cl-lib)
+;;; External Variables and Functions
+
+(defvar cj/custom-keymap) ; Defined in init.el
+(declare-function projectile-project-root "projectile" ())
+
;;; Variables
(defvar cj/test-global-directory nil
@@ -111,11 +116,7 @@ if not found or not in a project."
(mapcar #'file-name-nondirectory
(directory-files dir t "^test-.*\\.el$")))))
-<<<<<<< HEAD
-(defun cj/test--do-load-files (dir files)
-=======
(defun cj/test--do-load-files (_dir files)
->>>>>>> 76493d5 (feat:test-runner: Enhance ERT test runner with focus/unfocus support)
"Load test FILES from DIR.
Returns: (cons \\='success loaded-count) on success,
(cons \\='error (list failed-files errors)) on errors."