refactor: factor out inputs type check
[poolifier.git] / tests / pools / abstract / abstract-pool.test.js
index 972587b5a44a6fc6f44ae86ae0b82ec6351328de..a852bab430185b467176fae595fb1f8ddd7fe78f 100644 (file)
@@ -75,7 +75,7 @@ describe('Abstract pool test suite', () => {
         new FixedThreadPool(0.25, './tests/worker-files/thread/testWorker.js')
     ).toThrowError(
       new TypeError(
-        'Cannot instantiate a pool with a non integer number of workers'
+        'Cannot instantiate a pool with a non safe integer number of workers'
       )
     )
   })
@@ -407,6 +407,8 @@ describe('Abstract pool test suite', () => {
       './tests/worker-files/cluster/testMultiTasksWorker.js'
     )
     const data = { n: 10 }
+    const result0 = await pool.execute(data)
+    expect(result0).toBe(false)
     const result1 = await pool.execute(data, 'jsonIntegerSerialization')
     expect(result1).toBe(false)
     const result2 = await pool.execute(data, 'factorial')