A simple Javascript testing library designed for providing a fast feedback loop with minimal fuss.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
.jshintrc
.npmignore
LICENSE
README.md
package.json
roast.it.js
roast.js

README.md

Roast

A simple Javascript unit testing library designed for providing a fast feedback loop with minimal fuss.

Install

npm install roast.it --save

Make a test

Tests are added using the roast.it() function.

tests/my.tests.js:

var roast = require('roast.it');

roast.it(
    "Description of the test",
    function testFunction() {
        // your testing code
        // return true or false based on whether the test passed
        return true;
    }
);

Then, create a Javascript file that will run all your tests.

tests/tests.js:

var roast = require('roast.it');

// include all test files
require('./my.tests.js');

roast.run();
roast.exit();

Add this tests.js file to your package.json's scripts section.

package.json:

  "scripts": {
    "test": "node tests/tests.js"
  },

Then test using NPM:

> npm test

Which shows this in the terminal:

> node tests/tests.js                                                                                                                                                  
                                                                                                                                                                       
Roasted 1 tests.