Add eslint-plugin-spellcheck (#139)
[poolifier.git] / tests / pools / cluster / fixed.test.js
index 1a150dac2705bde9dc94ac351086b6ba81de83da..aae9127f9f354e79a41f2d3ac3eb3322d2ef3342 100644 (file)
@@ -1,9 +1,9 @@
 const expect = require('expect')
 const { FixedClusterPool } = require('../../../lib/index')
-const numWorkers = 10
+const numberOfWorkers = 10
 const maxTasks = 500
 const pool = new FixedClusterPool(
-  numWorkers,
+  numberOfWorkers,
   './tests/worker/cluster/testWorker.js',
   {
     errorHandler: e => console.error(e),
@@ -42,10 +42,10 @@ const asyncPool = new FixedClusterPool(
 describe('Fixed cluster pool test suite ', () => {
   it('Choose worker round robin test', async () => {
     const results = new Set()
-    for (let i = 0; i < numWorkers; i++) {
+    for (let i = 0; i < numberOfWorkers; i++) {
       results.add(pool.chooseWorker().id)
     }
-    expect(results.size).toBe(numWorkers)
+    expect(results.size).toBe(numberOfWorkers)
   })
 
   it('Verify that the function is executed in a worker cluster', async () => {
@@ -122,7 +122,7 @@ describe('Fixed cluster pool test suite ', () => {
     })
     pool.destroy()
     await new Promise(resolve => setTimeout(resolve, 200))
-    expect(closedWorkers).toBe(numWorkers)
+    expect(closedWorkers).toBe(numberOfWorkers)
   })
 
   it('Validations test', () => {