Bender.js
The anti-human approach to JavaScript testing.
Installation
To install Bender.js locally use:
$ [sudo] npm install benderjs
To simplify your work with Bender.js we highly encourage you to use benderjs-cli module.
Warning: All the following code samples assume you have benderjs-cli
installed globally.
Configuration
In order to configure Bender.js for your project, you need to create a configuration file.
Use bender init
command to create Bender configuration file and local .bender/
directory.
Below is an empty config file.
var config = {
};
module.exports = config;
For more information on Bender configuration, check out the Wiki - Configuration page.
Usage
Type bender
to see available commands:
Usage: bender <command> [options]
Commands:
clean Clean all Bender.js local files except the configuration
init Initialize Bender.js for this directory
run Run the tests in a browser and output the results to the console
server Handle Bender.js server
version Print Bender.js version
Options:
-c, --config Alternative path to Bender.js configuration file [bender.js]
-d, --debug
-H, --hostname Hostname used to run the server
-p, --port Port on which the server will listen
In order to run Bender in your project, open the console in project's directory and type:
$ bender server run
This will start the server in the verbose mode.
Now open a web browser. Bender.js dashboard is available under:
http://localhost:1030
Note: You can also run the server as a daemon:
bender server start
At the moment, starting a daemon is supported on Unix systems only.
If you want, you can specify a port or a hostname where Bender.js runs:
-p, --port The port on which the server will run (default: 1030).
-H, --hostname The hostname used to run the server (default: 0.0.0.0).
For more information on Bender command line interface, check out the Wiki - Command line page.
Running tests for Bender.js
$ npm install
$ npm test
To get the code coverage report run:
$ npm test --coverage
A detailed report will be created in ./coverage/lcov-report/index.html
file.
License
For license details see: LICENSE.md.