summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 3c101047..ed826c29 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -2106,6 +2106,17 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer."
   :if (fboundp #'js2--struct-put)
   :mode (("\\.jsx\\'" . rjsx-mode)))
 
+;;;;;;; mocha
+
+(use-package mocha
+  :after js2-mode
+  :config (progn
+            (setq mocha-reporter "tap")
+            (defun mocha-test-project ()
+              "Test the current project."
+              (interactive)
+              (mocha-run "'./{src,test}/**/*.test.js'"))))
+
 ;;;;;;; js2-refactor
 
 ;; Thanks to the AST provided by js2-mode, refactoring is possible.  This