node package manager

tape-expect

tape-expect

Tape + Expect.js

Features

You can now use expect.js with tape.

  • accurate error stack-traces & reporting
  • all expect goodness available into tape

Install

$ npm i tape-expect --save

Usage

Instead of doing require('tape') you just have to do require('tape-expect')

 
// var test = require('tape'); 
var test = require('tape-expect');
// now use as usual 
 
test('a simple test', function(t){
  t.equal(1, 1);
 
  //t.expect is available 
  t.expect(1).to.be(2);
  //the test will fail, and display accurate stack traces 
 
  t.end();
})

Misc

The main challenge was getting error stack traces show the correct place where the error occured, and not point to code from tape-expect

License

MIT