{"name":"@tapjs/test","version":"4.0.7","keywords":["tapjs plugin"],"author":{"url":"https://blog.izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"BlueOak-1.0.0","_id":"@tapjs/test@4.0.7","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/tapjs/tapjs#readme","bugs":{"url":"https://github.com/tapjs/tapjs/issues"},"nx":{"implicitDependencies":["!@tapjs/core","!@tapjs/after","!@tapjs/after-each","!@tapjs/asserts","!@tapjs/before","!@tapjs/before-each","!@tapjs/chdir","!@tapjs/filter","!@tapjs/fixture","!@tapjs/intercept","!@tapjs/mock","!@tapjs/node-serialize","!@tapjs/snapshot","!@tapjs/spawn","!@tapjs/stdin","!@tapjs/typescript","!@tapjs/worker"]},"bin":{"generate-tap-test-class":"dist/esm/build.mjs"},"tap":{"typecheck":false,"coverage-map":"map.js"},"dist":{"shasum":"6ea7e952911596c04cc5befaac6646ee3ae276d3","tarball":"http://registry-npm.ywwl.com/@tapjs/test/download/@tapjs/test-4.0.7.tgz","fileCount":62,"integrity":"sha512-U53nuW0il8qBDjarCfXfLYRWBaVwpSHc36YSvSyd/o1L2+dH80xC8DdZobJ/dVwcXTaXuGzBnMUuC4BqRdyklw==","signatures":[{"sig":"MEYCIQDE7NzPQVeZOiVz7mVhzxJbPal82KNyfvWXOFlpqsYVjgIhAN4PYuFG+h2LsRzHoHRmpiJxl2YEqeqhh0B+PVIT8Aov","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":280144,"size":52658,"noattachment":false,"key":"/@tapjs/test/-/@tapjs/test-4.0.7.tgz"},"main":"./dist/commonjs/index.js","tshy":{"main":true,"exports":{".":"./src/index.ts","./built":{"import":{"types":"./test-built/dist/esm/index.d.ts","default":"./test-built/dist/esm/index.js"},"require":{"types":"./test-built/dist/commonjs/index.d.ts","default":"./test-built/dist/commonjs/index.js"}},"./test-built":{"import":{"types":"./test-built/dist/esm/index.d.ts","default":"./test-built/dist/esm/index.js"},"require":{"types":"./test-built/dist/commonjs/index.d.ts","default":"./test-built/dist/commonjs/index.js"}},"./package.json":"./package.json","./generate-tap-test-class":"./src/build.mts"}},"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"}},"./built":{"import":{"types":"./test-built/dist/esm/index.d.ts","default":"./test-built/dist/esm/index.js"},"require":{"types":"./test-built/dist/commonjs/index.d.ts","default":"./test-built/dist/commonjs/index.js"}},"./test-built":{"import":{"types":"./test-built/dist/esm/index.d.ts","default":"./test-built/dist/esm/index.js"},"require":{"types":"./test-built/dist/commonjs/index.d.ts","default":"./test-built/dist/commonjs/index.js"}},"./package.json":"./package.json","./generate-tap-test-class":{"import":{"types":"./dist/esm/build.d.mts","default":"./dist/esm/build.mjs"}}},"gitHead":"ea6ee79909d4a0ca93aef1172c37c32e20a0102a","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+https://github.com/tapjs/tapjs.git","type":"git"},"_npmVersion":"11.6.2","description":"the pluggable Test class for node-tap","directories":{},"_nodeVersion":"24.4.1","dependencies":{"glob":"^13.0.0","tshy":"^3.0.3","mkdirp":"^3.0.0","rimraf":"^6.0.0","jackspeak":"^4.0.1","tap-parser":"18.0.3","typescript":"5.9","@tapjs/mock":"4.0.7","@tapjs/after":"3.0.7","@tapjs/chdir":"3.0.7","@tapjs/spawn":"4.0.7","@tapjs/stdin":"4.0.7","sync-content":"^2.0.1","walk-up-path":"^4.0.0","@tapjs/before":"4.0.7","@tapjs/filter":"4.0.7","@tapjs/worker":"4.0.7","@tapjs/asserts":"4.0.7","@tapjs/fixture":"4.0.7","resolve-import":"^2.1.1","@tapjs/snapshot":"4.0.7","@tapjs/intercept":"4.0.7","@tapjs/after-each":"4.0.7","@tapjs/typescript":"3.1.6","@tapjs/before-each":"4.0.7","@tapjs/node-serialize":"4.0.7","package-json-from-dist":"^1.0.0","@isaacs/ts-node-temp-fork-for-pr-2009":"^10.9.7"},"_hasShrinkwrap":false,"peerDependencies":{"@tapjs/core":"4.0.7"},"_npmOperationalInternal":{"tmp":"tmp/test_4.0.7_1763859956056_0.42188795227154685","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@tapjs/test`\n\nThe plugin-ified `Test` class in node-tap.\n\n## Class `Test`\n\nThis is the object that's actually provided to your tests. When\nyou do `t.pass('this is fine')`, this is the `t`.\n\nIt's also the base class of the `TAP` class which is the default\nexport of the `'tap'` module, so anything on `Test` is also on\n`TAP`.\n\nThe `Test` class itself adds only the following methods, but it\nhas the sum of all methods provided by all loaded plugins.\n\n### `t.applyPlugin(plugin: TapPlugin): Test`\n\nThis returns a new version of the Test object which has the\nplugin applied.\n\nNote that it's actually a different object, but anything done to\nthe copy will also affect the base, and it will inherit all\nproperties and methods that the base has, so the new object can\nbe used in place of the original.\n\nFor example:\n\n```js\nimport t from 'tap'\n\nconst plugin = t => ({\n  hello: () => console.log('hello from ', t.name),\n  blowUp: () => t.fail('blowing up'),\n})\n\nt.test('apply a plugin', original => {\n  const t = original.applyPlugin(plugin)\n  console.log(typeof original.hello) // 'undefined'\n  console.log(typeof t.hello) // 'function'\n  t.hello()\n  t.blowUp()\n  console.log(original.passing()) // false\n  t.end() // ends the subtest\n})\n```\n\n### `t.pluginLoaded(plugin: TapPlugin): boolean`\n\nReturns true if the plugin is loaded.\n\nAlso asserts that `t` implements the type returned by the plugin\nfunction.\n\nSo, for example, if a plugin _might_ be loaded, you can use this\nto get TypeScript to know about it.\n\n```ts\nimport t from 'tap'\nimport { Test } from '@tapjs/test'\n\nconst plugin = t => ({\n  hello: () => console.log('hello from ', t.name),\n  blowUp: () => t.fail('blowing up'),\n})\n\nconst maybeBlowup = (t: Test) => {\n  if (t.pluginLoaded(plugin)) {\n    t.blowUp()\n  } else {\n    t.pass('no blowup required')\n  }\n}\n\nt.test('maybe blow up', original => {\n  const t = original.applyPlugin(plugin)\n  maybeBlowup(original) // emits passing 'no blowup required'\n  maybeBlowup(t) // blows up\n  t.end()\n})\n```\n\n### `t.test()`, `t.todo()`, `t.skip()`\n\nCreates a subtest. You've seen this one before. This is the class\nthat implements it.\n\n## `signature: string`\n\nThe signature of the plugins built into this Test class.\n\n## `loaders: string[]`\n\nThe loaders added by plugins.\n\n## `testFileExtensions: Set<string>`\n\nThe test file extensions added by plugins.\n","publish_time":1763859956265,"_cnpm_publish_time":1763859956265,"dist-tags":{"latest":"4.4.11","pre":"1.0.0"}}