Skip to content

bhurlow/clearer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ultra simple, promisy test runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published