0.1.1 • Published 7 years ago

test-format v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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

license

MIT © Brandon Semilla