]> git.eshelyaron.com Git - emacs.git/commitdiff
; Skip two eglot tests when typescript is missing
authorStefan Kangas <stefankangas@gmail.com>
Mon, 12 Dec 2022 10:50:38 +0000 (11:50 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 12 Dec 2022 16:54:18 +0000 (17:54 +0100)
* test/lisp/progmodes/eglot-tests.el
(javascript-basic, project-wide-diagnostics-typescript): Skip tests
when the npm package "typescript" is not installed.

test/lisp/progmodes/eglot-tests.el

index fd0a68973ea075721aba383af0f3e0fcf4e7c657..32eefd778fefaf0d2cb09df4fc36ba69da137047 100644 (file)
@@ -723,7 +723,8 @@ pylsp prefers autopep over yafp, despite its README stating the contrary."
 
 (ert-deftest javascript-basic ()
   "Test basic autocompletion in a JavaScript LSP."
-  (skip-unless (executable-find "typescript-language-server"))
+  (skip-unless (and (executable-find "typescript-language-server")
+                    (executable-find "tsserver")))
   (eglot--with-fixture
       '(("project" . (("hello.js" . "console.log('Hello world!');"))))
     (with-current-buffer
@@ -752,7 +753,8 @@ pylsp prefers autopep over yafp, despite its README stating the contrary."
 
 (ert-deftest project-wide-diagnostics-typescript ()
   "Test diagnostics through multiple files in a TypeScript LSP."
-  (skip-unless (executable-find "typescript-language-server"))
+  (skip-unless (and (executable-find "typescript-language-server")
+                    (executable-find "tsserver")))
   (eglot--with-fixture
       '(("project" . (("hello.ts" . "const thing = 5;\nexport { thin }")
                       ("hello2.ts" . "import { thing } from './hello'"))))