From: Matthew Smith Date: Sat, 20 Jan 2024 09:45:31 +0000 (+0000) Subject: typescript-ts-mode: Skip test if tsx grammar missing X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=efbfcafe25d9f2e7f7e1cf85f3af6760bb27cb80;p=emacs.git 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 (cherry picked from commit c450eec07ff19953c8e1e75e99909d140db0e5d0) --- 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)