tape-extra

1.0.0 • Public • Published

tape-extra

For now, adds beforeEach/afterEach to tape

Usage

var test = require('tape-extra')
var count = 0

test.beforeEach = function (done) {
  console.log('before', ++count)
  setTimeout(done, 100)
}

test.afterEach = function (done) {
  console.log('after', count)
  setTimeout(done, 100)
}

test('fun is fun', function (t) {
  t.equal('fun', 'fun')
  t.end()
})

test('fun is not not fun', function (t) {
  t.notEqual('fun', 'not fun')
  t.end()
})

// should print:
// before 1
// after 1
// before 2
// after 2

Readme

Keywords

none

Package Sidebar

Install

npm i tape-extra

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • spwilko
  • genevayngrib
  • pgmemk
  • tenaciousmv