run-browser

The simplest way to run testling type tests in the browser

npm install run-browser
2 downloads in the last day
19 downloads in the last week
96 downloads in the last month

run-browser

The simplest way to run testling type tests in the browser

Dependency Status NPM version

Installation

npm install run-browser -g

Usage

run-browser tests/test.js

Options:

-p --port <number> The port number to run the server on (default: 3000)
-b --phantom       Use the phantom headless browser to run tests and then exit with the correct status code (if tests output TAP)

API Usage

Basic usage:

var runBrowser = require('run-browser');

var server = runBrowser('tests/test.js');
server.listen(3000);

Advanced Usage:

var runBrowser = require('run-browser');

var handler = runBrowser.createHandler('tests/test.js');
var server = http.createServer(function (req, res) {
  if (runBrowser.handles(req)) {
    return handler(req, res);
  }
  // any other server logic here
});
server.listen(3000);

License

MIT

npm loves you