An open API service indexing awesome lists of open source software.

https://github.com/semibran/test-format

Format minimal tests
https://github.com/semibran/test-format

format tests

Last synced: about 1 year ago
JSON representation

Format minimal tests

Awesome Lists containing this project

README

          

# test-format
> Format minimal tests

A test is an object with the fields `name`, `expected`, and `result`:
```js
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.
```js
console.log(tests.map(format).join('\n'))
```

## install
```sh
npm install test-format
```

## license
[MIT](https://opensource.org/licenses/MIT) © [Brandon Semilla](https://git.io/semibran)