aboutsummaryrefslogtreecommitdiff
path: root/modules/dev-fkeys.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/dev-fkeys.el')
-rw-r--r--modules/dev-fkeys.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/dev-fkeys.el b/modules/dev-fkeys.el
index 0f120a8d..c760e392 100644
--- a/modules/dev-fkeys.el
+++ b/modules/dev-fkeys.el
@@ -364,9 +364,10 @@ TypeScript / JavaScript and unknown languages return nil."
(if (string-empty-p rel-dir)
"./"
(format "./%s" rel-dir)))))
- ('typescript
+ ((or 'typescript 'javascript)
;; Prefer vitest when present on PATH, fall back to jest otherwise.
- ;; Both runners take a path argument and accept relative paths.
+ ;; Both runners take a path argument and accept relative paths, and
+ ;; both run JS test files the same way they run TS ones.
(let ((runner (or (and (executable-find "vitest") "vitest")
(and (executable-find "jest") "jest")
"jest"))) ; reasonable default for stack traces