Skip to content

Commit 74cc43e

Browse files
committed
setup major mode
1 parent 42cda11 commit 74cc43e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test-helper.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
;;; Code:
2424

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

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

0 commit comments

Comments
 (0)