Skip to content

Commit

Permalink
setup major mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 13, 2024
1 parent 42cda11 commit 74cc43e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test-helper.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

;;; Code:

(require 'treesit-langs) ; Install pre-built binary
(require 'treesit-langs) ; Install pre-built binaries

(defmacro cognitive-complexity-test (test-name file major-mode expected-result)
"Create a cognitive-complexity test named TEST-NAME using FILE in MAJOR-MODE.
Expand All @@ -31,6 +31,7 @@ Expecting result EXPECTED-RESULT."
`(ert-deftest ,test-name ()
(with-current-buffer (find-file-noselect ,file)
(,major-mode)
(treesit-langs-major-mode-setup)
(let* ((cognitive-complexity-results (cognitive-complexity-buffer))
(total-score (car cognitive-complexity-results))
(expressions-and-scores (cognitive-complexity-test-utils-expression-scores cognitive-complexity-results)))
Expand Down

0 comments on commit 74cc43e

Please sign in to comment.