test-format
v0.1.1
Published
Format minimal tests
Downloads
2
Readme
test-format
Format minimal tests
A test is an object with the fields name
, expected
, and result
:
const format = require('test-format')
var test = {
name: 'NaN',
expected: true,
result: NaN === NaN
}
console.log(format(test))
// -> '✖ NaN'
Since formatted tests are just plain strings, logging multiple test results is a breeze.
console.log(tests.map(format).join('\n'))
install
npm install test-format