README
testr
A generic object testing package for Node.js
Install
npm install testr
Usage
var testr = require('testr');
var objToValidate = 'hello world';
var result = testr.validate(objToValidate, {_startsWith: 'hello'});
and the result is:
{
actualValue: 'hello world',
_startsWith: {
passed: true,
validationValue: 'hello'
}
}
Validators
All validators begin with an underscore by default. You can override this by calling testr.configure with a configuration object argument like so:
testr.configure({validationPrefix: '