const pool = new DynamicThreadPool(
min,
max,
- './tests/worker-files/thread/testWorker.js',
+ './tests/worker-files/thread/testWorker.mjs',
{
errorHandler: e => console.error(e)
}
const pool = new DynamicThreadPool(
min,
max,
- './tests/worker-files/thread/testWorker.js'
+ './tests/worker-files/thread/testWorker.mjs'
)
const res = await pool.execute()
expect(res).toStrictEqual({ ok: 1 })
const longRunningPool = new DynamicThreadPool(
min,
max,
- './tests/worker-files/thread/longRunningWorkerHardBehavior.js',
+ './tests/worker-files/thread/longRunningWorkerHardBehavior.mjs',
{
errorHandler: e => console.error(e),
onlineHandler: () => console.info('long executing worker is online'),
const longRunningPool = new DynamicThreadPool(
min,
max,
- './tests/worker-files/thread/longRunningWorkerSoftBehavior.js',
+ './tests/worker-files/thread/longRunningWorkerSoftBehavior.mjs',
{
errorHandler: e => console.error(e),
onlineHandler: () => console.info('long executing worker is online'),
const pool = new DynamicThreadPool(
0,
max,
- './tests/worker-files/thread/testWorker.js'
+ './tests/worker-files/thread/testWorker.mjs'
)
expect(pool).toBeInstanceOf(DynamicThreadPool)
// We need to clean up the resources after our test