browser-test-mocha

1.0.2 • Public • Published

browser-test-mocha

browser-test-mocha sets up a test server using Mocha and Chai to test against a browser environment. You can use any mocha, chai, and sinon functionalitiy in your tests.

NPM version Known Vulnerabilities npm NPM downloads issues license Gitter

Install

To install it as a global command to use anywhere you can use:

$ npm install -g browser-test-mocha

Otherwise, if you just want to use it programmatically inside of a project, you can install it at a project level:

$ npm install --save-dev browser-test-mocha

Usage

To use browser-test-mocha, you need to pass the files containing the tests to it:

$ browser-test-mocha test/one.js,test/two.js,test/three.js

Note: multiple files can be passed separated by commas and no spaces in between.

After it has finished doing the necessary file operations, a http server will start up at nearest available port to 3000 and if you navigate to it in a browser, you will see the results of your tests.

Flags

The current flags available for browser-test-mocha are:

browser-test-mocha <files> [options] 

-V, --version       Outputs the current version of browser-test-mocha

Tests

To run the tests available for browser-test-mocha, use:

$ npm run test

License

MIT

Package Sidebar

Install

npm i browser-test-mocha

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

14.1 kB

Total Files

13

Last publish

Collaborators

  • robert.corponoi