feat: expose worker type in pool information
[poolifier.git] / tests / pools / abstract / abstract-pool.test.js
index b41ab1adc0265986b7f03603a4ca6e8553f5a0f9..80f43dda845c5e4e06b5cc0448b8ef4031f3dad7 100644 (file)
@@ -6,7 +6,8 @@ const {
   FixedThreadPool,
   PoolEvents,
   WorkerChoiceStrategies,
-  PoolTypes
+  PoolTypes,
+  WorkerTypes
 } = require('../../../lib')
 const { CircularArray } = require('../../../lib/circular-array')
 const { Queue } = require('../../../lib/queue')
@@ -282,6 +283,7 @@ describe('Abstract pool test suite', () => {
     )
     expect(pool.info).toStrictEqual({
       type: PoolTypes.fixed,
+      worker: WorkerTypes.thread,
       minSize: numberOfWorkers,
       maxSize: numberOfWorkers,
       workerNodes: numberOfWorkers,
@@ -299,6 +301,7 @@ describe('Abstract pool test suite', () => {
     )
     expect(pool.info).toStrictEqual({
       type: PoolTypes.dynamic,
+      worker: WorkerTypes.cluster,
       minSize: numberOfWorkers,
       maxSize: numberOfWorkers * 2,
       workerNodes: numberOfWorkers,