Add eslint-plugin-spellcheck (#139)
[poolifier.git] / tests / pools / thread / fixed.test.js
index ec6a066bf8c0042cc2ff21a7e9345f87416b72a9..a5ec3f0a8a63e720b1c789e9a23249a1ca866a4f 100644 (file)
@@ -1,9 +1,9 @@
 const expect = require('expect')
 const { FixedThreadPool } = require('../../../lib/index')
-const numThreads = 10
+const numberOfThreads = 10
 const maxTasks = 400
 const pool = new FixedThreadPool(
-  numThreads,
+  numberOfThreads,
   './tests/worker/thread/testWorker.js',
   {
     errorHandler: e => console.error(e),
@@ -29,10 +29,10 @@ const asyncPool = new FixedThreadPool(
 describe('Fixed thread pool test suite ', () => {
   it('Choose worker round robin test', async () => {
     const results = new Set()
-    for (let i = 0; i < numThreads; i++) {
+    for (let i = 0; i < numberOfThreads; i++) {
       results.add(pool.chooseWorker().threadId)
     }
-    expect(results.size).toBe(numThreads)
+    expect(results.size).toBe(numberOfThreads)
   })
 
   it('Verify that the function is executed in a worker thread', async () => {
@@ -95,7 +95,7 @@ describe('Fixed thread pool test suite ', () => {
       })
     })
     await pool.destroy()
-    expect(closedThreads).toBe(numThreads)
+    expect(closedThreads).toBe(numberOfThreads)
   })
 
   it('Validations test', () => {