Factor out some UTs code in test-utils.js
[poolifier.git] / tests / worker-files / thread / errorWorker.js
... / ...
CommitLineData
1'use strict'
2const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
3
4function error (data) {
5 throw new Error('Error Message from ThreadWorker')
6}
7
8module.exports = new ThreadWorker(error, {
9 maxInactiveTime: 500,
10 async: false,
11 killBehavior: KillBehaviors.HARD
12})