{"name":"@tapjs/before-each","version":"4.3.8","keywords":["tapjs plugin"],"author":{"name":"Isaac Z. Schlueter"},"license":"BlueOak-1.0.0","_id":"@tapjs/before-each@4.3.8","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/tapjs/tapjs/tree/main/src/before-each#readme","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"tap":{"typecheck":false},"dist":{"shasum":"52e990f749787aaef518f26fedb1d49611357304","tarball":"http://registry-npm.ywwl.com/@tapjs/before-each/download/@tapjs/before-each-4.3.8.tgz","fileCount":13,"integrity":"sha512-iZgtOp+KjkGayEUi53hQ8DfJEqNHyJ7xIr/26UY1FFOE5yFxpgy1Ue/eo1hFzzbTCDKLsRcQxiAuyv0/MI29cA==","signatures":[{"sig":"MEUCIQDiejUx3UUp0Gh5pU+Vr8Z3dhIG31KOfNRDbr6GBA2zkwIgW2Osv/bhX/PR7d38HXWTzDJefHgN6rjOTTKp18LEG6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18436,"size":4176,"noattachment":false,"key":"/@tapjs/before-each/-/@tapjs/before-each-4.3.8.tgz"},"main":"./dist/commonjs/index.js","tshy":{"main":true,"exports":{".":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":"20 || >=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"e79377683b8ec7853984771353b16175050b2541","scripts":{"snap":"tap","test":"tap","format":"prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache","prepare":"tshy","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc --tsconfig tsconfig/esm.json ./src/*.ts"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+ssh://git@github.com/tapjs/tapjs.git","path":"src/before-each","type":"git"},"_npmVersion":"10.9.7","description":"a built-in tap extension for t.beforeEach()","directories":{},"_nodeVersion":"22.22.2","dependencies":{"function-loop":"^4.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"@tapjs/core":"4.5.6"},"_npmOperationalInternal":{"tmp":"tmp/before-each_4.3.8_1777657044827_0.08221131699150508","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@tapjs/before-each`\n\nA default tap plugin providing `t.beforeEach()`.\n\n## USAGE\n\nThis plugin is installed with tap by default. If you had\npreviously removed it, you can `tap plugin add @tapjs/before-each` to\nbring it back.\n\n```ts\nimport t from 'tap'\nt.beforeEach(t => {\n  // this will run before each child test, all of their child\n  // tests, and so on\n  // the parameter is the child test that is about to start.\n})\n```\n\nIf the method returns a promise, it will be awaited before moving\non to the next test.\n\nThe `beforeEach` method is called for _all_ child tests, not just\ndirect children. \"Closer\" ancestor `beforeEach` methods are called\nafter further ancestors.\n\nFor example, this test:\n\n```js\nimport t from 'tap'\nt.beforeEach(t => {\n  console.error('root before each', t.name)\n})\n\nt.test('parent test', t => {\n  t.beforeEach(t => {\n    console.error('parent before each', t.name)\n  })\n  t.test('child test', t => t.end())\n  t.end()\n})\n```\n\nwill print:\n\n```\nroot before each parent test\nroot before each child test\nparent before each child test\n```\n","publish_time":1777657044971,"_cnpm_publish_time":1777657044971,"dist-tags":{"latest":"4.3.13","pre":"1.0.0"}}