Atom : Mocha test runner
Runs Mocha unit tests from within Atom.
- the current test file
- or a single
testif the cursor is on that line
ctrl-alt-dis the same as above, but with
ctrl-alt-shift-mre-runs the last test selection
- even if you switched to another tab
ctrl-alt-shift-dis the same as above, but with
This plugin looks for the closest
package.json to the current file,
and run the corresponding
mocha. This should automatically pick up the right version,
as well as your
If you don't have a
package.json file, or if Mocha isn't installed locally,
it will try to execute the global
mocha command instead.
How does it work?
To run the selected test, it uses
--grep on the test name.
In the case the name isn't unique enough, it might run a few other tests.
In practice we found this is not an issue, and you still get fast TDD feedback loops.
If you go to the settings pane, you can set the following values:
Node binary path: path to the
nodeexecutable (defaults to
Text only: remove any colors from the Mocha output (defaults to
Show context information: display extra information for troubleshooting (defaults to
Options: append given options always to Mocha binary (optional).
Options for Debug: append given options to Mocha binary to enable debugging.
Env: environment variables, useful for specifying
You can also change the style of the results window. Simply go to
Open Your Stylesheet in the main menu, and add