From 160b6167644bd3f9be2f215adb88164f64ffec9f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 21 Dec 2017 11:59:08 +0100 Subject: Emacs: configure mocha.el --- emacs/.emacs.d/main.el | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit 1.4.1