🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clearer

tape inspired test runner with jazz

0.0.3
latest
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 08 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts