clearer

0.0.3 • Public • Published

Clearer

an ultrasimple test runner that let's you yield promises inside your test cases

npm install -g clearer

restults in:

clearer -w example.js:

✓ bing bing foops
✓ kafoo blam
x kafoo blam : thats bad
x kafoo blam

--- completed 2 tests : 2 passed : 2 failed  ---

an example test file:

var test = require('clearer')
 
function timer() {
  return new Promise(function(resolve, reject) {
    setTimeout(function() {
      resolve(123)
    }, 1500)
  })
}
 
test('bing bong', function*() {
  // yield as many promises as you need to:
  var res1 = yield timer()
  this.equals(123, res1)
  
  var res2 = yield timer()
  this.equals(123, res2)
})

Assertations

this.equals

this.ok

Readme

Keywords

Package Sidebar

Install

npm i clearer

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • bhurlow