CAUTION
This project is under development now.
Sorry to keep you waiting.
Please see GitHub Milestones
What's "Macchiato"? What's "QDD"?
Macchiato is a testing framework for JavaScript, inspired by QuickCheck, a similar library for Haskell programs.
Example
macchiato.stock({
'number x, y => x + y == y + x':
arbitrary( 'number', 'number' ).property( function( x, y ){
return x + y == y + x;
}),
'string str => str can be regarded as boolean that is empty or not':
arbitrary( 'string' ).property( function( str ){
if ( str.length === 0 ){
return false === !!str;
}
return true === !!str;
}),
'integer x, y (x !== y) => x - y !== y - x':
arbitrary( 'integer', 'integer' ).property( function( x, y ){
return where( [ x !== y ], function(){
return x - y !== y - x;
});
})
});