Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mocha-test-runner

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-test-runner

Run Mocha tests from within Atom

  • 0.4.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Atom : Mocha test runner

License

Runs Mocha unit tests from within Atom.

  • ctrl-alt-m runs either:

    • the current test file
    • or a single it / describe / suite / test if the cursor is on that line
  • ctrl-alt-d is the same as above, but with Debug Options added

  • ctrl-alt-shift-m re-runs the last test selection

    • even if you switched to another tab
  • ctrl-alt-shift-d is the same as above, but with Debug Options added

Demo

Running Mocha

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 mocha.opts settings.

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.

Settings

If you go to the settings pane, you can set the following values:

  • Node binary path: path to the node executable (defaults to /usr/local/bin/node).
  • Text only: remove any colors from the Mocha output (defaults to false).
  • Show context information: display extra information for troubleshooting (defaults to false).
  • 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 NODE_ENV, etc.

You can also change the style of the results window. Simply go to Open Your Stylesheet in the main menu, and add

.mocha-test-runner .results {
  font-size: 1.5em;
}

FAQs

Package last updated on 14 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc