Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tapjs/worker

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/worker - npm Package Compare versions

Comparing version 0.0.0-15 to 0.0.0-16

6

package.json
{
"name": "@tapjs/worker",
"version": "0.0.0-15",
"version": "0.0.0-16",
"description": "a built-in tap extension for t.worker()",

@@ -46,6 +46,6 @@ "type": "module",

"peerDependencies": {
"@tapjs/core": "0.0.0-15"
"@tapjs/core": "0.0.0-16"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": ">=16"
},

@@ -52,0 +52,0 @@ "repository": {

# `@tapjs/worker`
A default tap plugin providing `t.worker()`
A default tap plugin providing `t.worker()`.
## USAGE
This plugin is installed with tap by default. If you had
previously removed it, you can `tap plugin add @tapjs/worker` to
bring it back.
### Interface `WorkerOpts`
Options for `t.worker()`
All of the normal Base and Extra options are also allowed.
- `workerData` - Any data passed to the Worker thread.
Shows up in the worker thread as `t.workerData` on the root
`TAP` test.
- `env` - Environment variables provided to the worker thread
- `eval` - if set to `true`, then the `filename` will be treated
as inline JavaScript code rather than a filename to run.
### `t.worker(filename, [options], [name]): PromiseWithWorker`
Arguments:
- `filename` `string` - The file to execute in the thread, or if
`{ eval: true }` is in the options, a string of JavaScript code
to run.
- `options` (optional) `WorkerOpts` object
- `name` (optional) `string` - name of the subtest
Starts a [Node.js
Worker](https://nodejs.org/api/worker_threads.html#class-worker)
thread when the test starts, parsing its standard output as a TAP
stream.
Returns a Promise that resolves when the test is complete. The
`subtest` member on the Promise is a
[`Worker`](https://tapjs.github.io/tapjs/classes/_tapjs_core.worker.Worker.html)
instance.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc