diff options
author | Alan Pearce | 2017-12-21 11:59:08 +0100 |
---|---|---|
committer | Alan Pearce | 2017-12-21 11:59:08 +0100 |
commit | 160b6167644bd3f9be2f215adb88164f64ffec9f (patch) | |
tree | fe76c0cf2b9a96149b06747e74d0f4889b0bfb9e | |
parent | a54540c63ecd95778aa5d6b0a55787ccf009128b (diff) | |
download | dotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.tar.lz dotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.tar.zst dotfiles-160b6167644bd3f9be2f215adb88164f64ffec9f.zip |
Emacs: configure mocha.el
-rw-r--r-- | emacs/.emacs.d/main.el | 11 |
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 |