1.0.2 • Published 7 years ago

tape-end-hook v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Helps keeping tests more readable

Example:

const test = require('tape')
const atEnd = require('tape-end-hook')

test('triple hook, some async', t => {
  t.plan(3)
  let counter = 0
  atEnd(t, () => { t.equal(++counter, 3) })
  atEnd(t, async () => { await sleep(1); t.equal(++counter, 2) })
  atEnd(t, () => { t.equal(++counter, 1) })
  t.end()
})
1.0.2

7 years ago

1.0.1

7 years ago