summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-12-21 11:59:08 +0100
committerAlan Pearce2017-12-21 11:59:08 +0100
commit160b6167644bd3f9be2f215adb88164f64ffec9f (patch)
treefe76c0cf2b9a96149b06747e74d0f4889b0bfb9e /emacs
parenta54540c63ecd95778aa5d6b0a55787ccf009128b (diff)
downloaddotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.tar.lz
dotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.tar.zst
dotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.zip
Emacs: configure mocha.el
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 3c10104..ed826c2 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