Neovictorian Paisley Menswear
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

tape-expect

1.2.0 • Public • Published

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

Keywords

none

install

npm i tape-expect

Downloadsweekly downloads

11

version

1.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability