aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Smith2024-01-20 09:45:31 +0000
committerYuan Fu2024-01-20 21:10:51 -0800
commitc450eec07ff19953c8e1e75e99909d140db0e5d0 (patch)
treeec35a9c22885a043e25d830ae26a1f6c36638e6b
parent9841ced147f8a198da58a7925c0be55e2ed8dc75 (diff)
downloademacs-c450eec07ff19953c8e1e75e99909d140db0e5d0.tar.gz
emacs-c450eec07ff19953c8e1e75e99909d140db0e5d0.zip
typescript-ts-mode: Skip test if tsx grammar missing
typescript-ts-mode-test-indentation depends on both the tree-sitter typescript grammar, and the tree-sitter tsx grammar. If only the typescript is installed, the tests will run and then fail unexpectedly after tsx fails to load. * test/lisp/progmodes/typescript-ts-mode-tests.el (typescript-ts-mode-test-indentation): Skip test if tsx grammar is missing. Copyright-paperwork-exempt: yes
-rw-r--r--test/lisp/progmodes/typescript-ts-mode-tests.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lisp/progmodes/typescript-ts-mode-tests.el b/test/lisp/progmodes/typescript-ts-mode-tests.el
index 27b7df714e6..effd9551fb0 100644
--- a/test/lisp/progmodes/typescript-ts-mode-tests.el
+++ b/test/lisp/progmodes/typescript-ts-mode-tests.el
@@ -24,7 +24,8 @@
24(require 'treesit) 24(require 'treesit)
25 25
26(ert-deftest typescript-ts-mode-test-indentation () 26(ert-deftest typescript-ts-mode-test-indentation ()
27 (skip-unless (treesit-ready-p 'typescript)) 27 (skip-unless (and (treesit-ready-p 'typescript)
28 (treesit-ready-p 'tsx)))
28 (ert-test-erts-file (ert-resource-file "indent.erts"))) 29 (ert-test-erts-file (ert-resource-file "indent.erts")))
29 30
30(provide 'typescript-ts-mode-tests) 31(provide 'typescript-ts-mode-tests)