@archivistnerd/testlib
v0.1.2
Published
Archivist Nerd's testlib Package
Downloads
7
Maintainers
Readme
node-testlib
Archivist nerd's testlib: A bare minimum node test suite
A very small minimilistic test suite for node.
Installation
npm install -g @archivistnerd/testlib
describe/it Example
let describe = require('@archivistnerd/testlib').describe;
describe( 'test (describe, it)', it=>{
it('test-description', ()=>{
return true
})
it('test-description 2', ()=>{
return true
})
it('test-fail', ()=>{
return false
})
it('test-fail (no return value)', ()=>{
})
});
add/exec Example
require('@archivistnerd/testlib')
/**
* @test:attempt testlib.add
*/
.add(
'testlib.add( name, testFn, resultTestFn)',
() => ({ works: true }),
(result)=> (result.works==true)
)
/**
* @test:attempt returns true so no need for resultTestFn
*/
.add(
'testlib.add( name, testFn )',
() => true
)
.exec();
License
MIT