alltested

0.0.3 • Public • Published

alltested

Build Status

Ensures every method within every .js file has a correponding test

Installation

npm install --save alltested

Usage

Take a look at the nodeunit test below, should you still have any doubt try cheking some more examples here!

var alltested = require("alltested");
 
module.exports = {
  "Ensure all is tested": function(test){
    alltested(__dirname);     
    //this assumes your app is at __dirname + "/.." and that all your tests should stay at __dirname
    //if this is not your case you may go like this:
    
    var appFolder = __dirname + "/../app",
        testFolder = __dirname + "/../tests";
    
    alltested(appFolder, testFolder);
    
    //You can still pass a third (or second) parameter specifying files that should be skipped:
    alltested(appFolder, testFolder, {
      ignore: [
        "noTestForMePlease.js",
        /wildRegExpForLotsOfFilesThatDontNeedTesting/i
      ];
    });
    
    test.done();
  }
}
 

License MIT

Readme

Keywords

none

Package Sidebar

Install

npm i alltested

Weekly Downloads

2

Version

0.0.3

License

MIT

Last publish

Collaborators

  • gammasoft