{"name":"@tapjs/before-each","version":"4.3.11","description":"a built-in tap extension for t.beforeEach()","tshy":{"main":true,"exports":{"./package.json":"./package.json",".":"./src/index.ts"},"selfLink":false},"type":"module","main":"./dist/commonjs/index.js","module":"./dist/esm/index.js","types":"./dist/commonjs/index.d.ts","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"scripts":{"prepare":"tshy","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc --tsconfig tsconfig/esm.json ./src/*.ts"},"author":{"name":"Isaac Z. Schlueter"},"license":"BlueOak-1.0.0","dependencies":{"function-loop":"^4.0.0"},"peerDependencies":{"@tapjs/core":"4.5.9"},"tap":{"typecheck":false},"repository":{"type":"git","url":"git+ssh://git@github.com/tapjs/tapjs.git","path":"src/before-each"},"homepage":"https://github.com/tapjs/tapjs/tree/main/src/before-each#readme","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"keywords":["tapjs plugin"],"engines":{"node":"20 || >=22"},"gitHead":"88f4b97ec068d0ab6908f472706f57d273b32ba9","_id":"@tapjs/before-each@4.3.11","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-T44rC2+ycj1KC/VVMcFnBosTJq4ne8ixEV0T1lJOXZbseXRp8VlGKNCPAjJV6Vb88xxuAwf9ZouXnbzhPg/HCQ==","shasum":"32bffc0760c5e2c98095aadb0affcb0176307753","tarball":"http://registry-npm.ywwl.com/@tapjs/before-each/download/@tapjs/before-each-4.3.11.tgz","fileCount":13,"unpackedSize":18437,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCXdQHvej47sNKKCf7ixtl9ZokisH/AYSdQllaM7Q26sQIhAN04ZQtkLsUtRW9MHvP9FcTKSH+h57uPjK+BRiKQkXzB"}],"size":4155,"noattachment":false,"key":"/@tapjs/before-each/-/@tapjs/before-each-4.3.11.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/before-each_4.3.11_1785178332008_0.477039482265351"},"_hasShrinkwrap":false,"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":1785178332162,"_cnpm_publish_time":1785178332162,"dist-tags":{"latest":"4.3.13","pre":"1.0.0"}}