co-lab

0.0.1 • Public • Published

co-lab

Build

This module lets you use powered by co generators inside lab tests. Node 0.11+ is required.

Install

$ npm install co lab co-lab

Usage

Use inside tests

let Lab = require("co-lab");

instead of

var Lab = require("lab");

See a demo bellow to see abilities of this module

"use strict";
let Lab = require("co-lab");

Lab.experiment("ES6 generators", function(){
  Lab.before(function*(){ //beforeEach is supported too
    //some preparations here
  });

  Lab.after(function*(){ //afterEach is supported too
    //some finalizations here
  });

  Lab.test("my test", function*(){
    //do some test here. throw an exception on error
  });

  Lab.test("my test2", function(done){
    //general function with callback is supported too
    done();
  });
});

Package Sidebar

Install

npm i co-lab

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • avb