lumah


Install Size Travis build Discord NPM version NPM version Patreon

npm installnfo

> A simple and lightweight testing framework for Node.js > [GitHub](https://www.github.com/PassTheWessel/lumah) **|** [NPM](https://www.npmjs.com/package/lumah) ## Installing ```sh $ yarn add lumah # Install w/ Yarn (the superior package manager) $ npm i lumah # Install w/ NPM ``` ## Usage ```js 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 ```