{"_id":"@tapjs/before-each@4.3.13","tap":{"typecheck":false},"bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"dist":{"shasum":"ef234cbe211542670b898b4438acbc028eb4db8b","tarball":"http://registry-npm.ywwl.com/@tapjs/before-each/download/@tapjs/before-each-4.3.13.tgz","fileCount":13,"integrity":"sha512-C3ONPuOP8ba29Kg2pWUGsruU/SlqW3kPS9bdd8f8arr44yUmTIQxhOUweIZO8MPSMvn+1gEUTAiB/UN9JNOTrA==","signatures":[{"sig":"MEUCIDyjKfwXMj1cByWL0+cFKIkia8FBXml1S78yTIOCMVH4AiEAqxYI/1hx6TZuGX4KNknlpzJgk8Gyh2m5GepYCSL8stk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCGSc1HgV9EPxt45mYB3QC/ZH35OhHU1Z/qSqG5RxRhSQIhAKI9XyHi1l4PYPyuiY3zHZh2m5hZ6Cm3G/7KUxXOrK4E"}],"unpackedSize":18437,"size":4154,"noattachment":false,"key":"/@tapjs/before-each/-/@tapjs/before-each-4.3.13.tgz"},"main":"./dist/commonjs/index.js","name":"@tapjs/before-each","tshy":{"main":true,"exports":{".":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","author":{"name":"Isaac Z. Schlueter"},"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":"6874ffcc3e671f64b5dbabdd25b26904d3e2ed84","license":"BlueOak-1.0.0","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"},"version":"4.3.13","_npmUser":{"name":"isaacs","email":"i@izs.me"},"homepage":"https://github.com/tapjs/tapjs/tree/main/src/before-each#readme","keywords":["tapjs plugin"],"repository":{"url":"git+ssh://git@github.com/tapjs/tapjs.git","path":"src/before-each","type":"git"},"_npmVersion":"12.2.0","description":"a built-in tap extension for t.beforeEach()","directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"_nodeVersion":"26.5.0","dependencies":{"function-loop":"^4.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"@tapjs/core":"4.6.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/before-each_4.3.13_1793744216873_0.7053402321216536"},"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":1793744217001,"_cnpm_publish_time":1793744217001,"dist-tags":{"latest":"4.3.13","pre":"1.0.0"}}