/
moreqqq
/
DeliveryService
Обзор
Документация
Войти
/
moreqqq
/
DeliveryService
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
DeliveryService
/
...
/
node_modules
/
jest-worker
/
..
build
написал тесты
2 месяца назад
node_modules
написал приложение
2 месяца назад
LICENSE
написал тесты
2 месяца назад
README.md
написал тесты
2 месяца назад
package.json
написал тесты
2 месяца назад
jest-worker
Install
Example
File `parent.js`
File `worker.js`
Experimental worker
API
`workerPath: string | URL` (required)
`options: Object` (optional)
`computeWorkerKey: (method: string, ...args: Array) => string | null` (optional)
`enableWorkerThreads: boolean` (optional)
`exposedMethods: ReadonlyArray` (optional)
`forkOptions: ForkOptions` (optional)
`idleMemoryLimit: number` (optional)
`maxRetries: number` (optional)
`numWorkers: number` (optional)
`resourceLimits: ResourceLimits` (optional)
`silent: Boolean` (optional)
`setupArgs: Array` (optional)
`taskQueue: TaskQueue` (optional)
`WorkerPool: new (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface` (optional)
`workerSchedulingPolicy: 'round-robin' | 'in-order'` (optional)
JestWorker
Methods
`getStdout(): Readable`
`getStderr(): Readable`
`start()`
`end()`
Worker IDs
Setting up and tearing down the child process
More examples
Standard usage
File `parent.js`
File `worker.js`
Bound worker usage:
File `parent.js`
File `worker.js`
README.md