test: switch thread worker to ESM
[poolifier.git] / tests / worker-files / thread / longRunningWorkerSoftBehavior.mjs
1 import { ThreadWorker } from '../../../lib/index.js'
2 import { sleepTaskFunction } from '../../test-utils.js'
3
4 /**
5 *
6 * @param data
7 */
8 async function sleep (data) {
9 return sleepTaskFunction(data, 50000)
10 }
11
12 export default new ThreadWorker(sleep, {
13 maxInactiveTime: 500
14 })