@tapjs/after-each
a built-in tap extension for t.afterEach()
Last updated a year ago by isaacs .
BlueOak-1.0.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @tapjs/after-each 
SYNC missed versions from official npm registry.

@tapjs/after-each

A default tap plugin providing t.afterEach().

USAGE

This plugin is installed with tap by default. If you had previously removed it, you can tap plugin add @tapjs/after-each to bring it back.

import t from 'tap'
t.afterEach(t => {
  // this will run after each child test, all of their child
  // tests, and so on
  // the parameter is the child test that just ended.
})

If the method returns a promise, it will be awaited before moving on to the next test.

The afterEach method is called for all child tests, not just direct children. "Closer" ancestor afterEach methods are called before further ancestors.

For example, this test:

import t from 'tap'
t.afterEach(t => {
  console.error('root after each', t.name)
})

t.test('parent test', t => {
  t.afterEach(t => {
    console.error('parent after each', t.name)
  })
  t.test('child test', t => t.end())
  t.end()
})

will print:

parent after each child test
root after each child test
root after each parent test

Current Tags

  • 4.0.0                                ...           latest (6 months ago)
  • 1.0.0                                ...           pre (a year ago)

68 Versions

  • 4.0.0                                ...           6 months ago
  • 3.0.3                                ...           6 months ago
  • 3.0.2                                ...           6 months ago
  • 3.0.1                                ...           6 months ago
  • 3.0.0                                ...           6 months ago
  • 2.0.8                                ...           6 months ago
  • 2.0.7                                ...           6 months ago
  • 2.0.6                                ...           7 months ago
  • 2.0.5                                ...           7 months ago
  • 2.0.4                                ...           7 months ago
  • 2.0.3                                ...           7 months ago
  • 2.0.2                                ...           7 months ago
  • 2.0.1                                ...           7 months ago
  • 2.0.0                                ...           7 months ago
  • 1.1.22                                ...           7 months ago
  • 1.1.21                                ...           8 months ago
  • 1.1.20                                ...           9 months ago
  • 1.1.19                                ...           10 months ago
  • 1.1.18                                ...           a year ago
  • 1.1.17                                ...           a year ago
  • 1.1.16                                ...           a year ago
  • 1.1.15                                ...           a year ago
  • 1.1.14                                ...           a year ago
  • 1.1.13                                ...           a year ago
  • 1.1.12                                ...           a year ago
  • 1.1.11                                ...           a year ago
  • 1.1.10                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.0-22                                ...           a year ago
  • 0.0.0-21                                ...           a year ago
  • 0.0.0-20                                ...           a year ago
  • 0.0.0-19                                ...           a year ago
  • 0.0.0-18                                ...           a year ago
  • 0.0.0-17                                ...           a year ago
  • 0.0.0-16                                ...           a year ago
  • 0.0.0-15                                ...           a year ago
  • 0.0.0-14                                ...           a year ago
  • 0.0.0-13                                ...           a year ago
  • 0.0.0-12                                ...           a year ago
  • 0.0.0-11                                ...           a year ago
  • 0.0.0-10                                ...           a year ago
  • 0.0.0-9                                ...           a year ago
  • 0.0.0-8                                ...           a year ago
  • 0.0.0-7                                ...           a year ago
  • 0.0.0-6                                ...           a year ago
  • 0.0.0-5                                ...           a year ago
  • 0.0.0-4                                ...           a year ago
  • 0.0.0-3                                ...           a year ago
  • 0.0.0-2                                ...           a year ago
  • 0.0.0-1                                ...           a year ago
  • 0.0.0-0                                ...           a year ago
Maintainers (2)
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE