async function runPoolifierTest (pool, { tasks, workerData }) {
return new Promise((resolve, reject) => {
let executions = 0
- for (let i = 0; i <= tasks; i++) {
+ for (let i = 1; i <= tasks; i++) {
pool
.execute(workerData)
.then(res => {
return Math.floor(Math.random() * max + 1)
}
-module.exports = { runPoolifierTest, generateRandomInteger }
+const LIST_FORMATTER = new Intl.ListFormat('en-US', {
+ style: 'long',
+ type: 'conjunction'
+})
+
+module.exports = { generateRandomInteger, LIST_FORMATTER, runPoolifierTest }