summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2024-01-20 09:45:31 +0000
committerYuan Fu <casouri@gmail.com>2024-01-20 21:10:51 -0800
commitc450eec07ff19953c8e1e75e99909d140db0e5d0 (patch)
treeec35a9c22885a043e25d830ae26a1f6c36638e6b
parent9841ced147f8a198da58a7925c0be55e2ed8dc75 (diff)
downloademacs-c450eec07ff.tar.gz
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 @@
(require 'treesit)
(ert-deftest typescript-ts-mode-test-indentation ()
- (skip-unless (treesit-ready-p 'typescript))
+ (skip-unless (and (treesit-ready-p 'typescript)
+ (treesit-ready-p 'tsx)))
(ert-test-erts-file (ert-resource-file "indent.erts")))
(provide 'typescript-ts-mode-tests)