chore: fix typo

This commit is contained in:
tolluset 2024-06-09 18:15:28 +09:00
parent 52b40620a7
commit ffbcc29470

View file

@ -107,7 +107,7 @@ export class FullConfigInternal {
const cpus = os.cpus().length; const cpus = os.cpus().length;
this.config.workers = Math.max(1, Math.floor(cpus * (parseInt(workers, 10) / 100))); this.config.workers = Math.max(1, Math.floor(cpus * (parseInt(workers, 10) / 100)));
} else { } else {
this.config.workers = resolveWorkes(workers); this.config.workers = resolveWorkers(workers);
} }
} else { } else {
this.config.workers = workers; this.config.workers = workers;
@ -223,7 +223,7 @@ function resolveReporters(reporters: Config['reporter'], rootDir: string): Repor
}); });
} }
function resolveWorkes(workers: string) { function resolveWorkers(workers: string) {
const parsedWorkers = parseInt(workers, 10); const parsedWorkers = parseInt(workers, 10);
if (isNaN(parsedWorkers)) if (isNaN(parsedWorkers))
throw new Error(`Workers ${workers} must be a number or percentage.`); throw new Error(`Workers ${workers} must be a number or percentage.`);