
Security News
TC39 Advances Temporal to Stage 4 Alongside Several ECMAScript Proposals
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.
@tapjs/before
Advanced tools
@tapjs/beforeA default tap plugin providing t.before().
This plugin is installed with tap by default. If you had
previously removed it, you can tap plugin add @tapjs/before to
bring it back.
import t from 'tap'
t.before(() => {
// this will run before the tests in this file start
})
If the method returns a promise, it will be awaited before moving on to the next test.
A t.before() method will run prior to any subsequent child
tests. If it's called before any child tests have started, then
it will be run right away.
So, this test:
import t from 'tap'
t.before(() => {
console.error('before initial')
})
t.test('first test', t => {
t.before(async () => {
// this will wait before moving on
await new Promise(res => setTimeout(res, 100))
console.error('before in first test')
})
console.error('in first test')
t.test('child test', t => {
console.error('child of first test')
t.end()
})
t.end()
})
t.before(() => {
console.error('before between')
})
t.test('second test', t => {
console.error('in second test')
t.end()
})
will print:
before initial
in first test
before in first test
child of first test
before between
in second test
Essentially, t.before() is a bit like a child test method that
doesn't get a Test object as an argument.
FAQs
a built-in tap extension for t.before()
The npm package @tapjs/before receives a total of 157,278 weekly downloads. As such, @tapjs/before popularity was classified as popular.
We found that @tapjs/before demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.

Research
/Security News
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.