lumah
v0.0.2
Published
🔩 A simple and lightweight testing framework for Node.js
Downloads
3
Maintainers
Readme
A simple and lightweight testing framework for Node.js
Installing
$ yarn add lumah # Install w/ Yarn (the superior package manager)
$ npm i lumah # Install w/ NPM
Usage
const l = require( 'lumah' ); // Define lumah
l.register( 'Hello', ( res ) => res( true, 'Danceboye' ) ); // Register a test with the name "Hello" and succeed with the message "Danceboye"
l.register( 'This is so sad', ( res ) => res( false, 'Sadcat' ) ); // Fail with the message "sadcat"
l.register( 'Late ;_;', ( res ) => setTimeout( () => res( true, 'I\'ve came!' ), 500 ) ); // Succeed after 500ms
l.register( 'memes', ( res ) => {
if ( process.env.MEMES ) res( true, 'You are a true memester' ) // Success if process.env has the value "MEMES"
res( false, 'Well, that\'s a shame :(' ) // Fail otherwise
});
l.start(); // Run all tests