testCompilerThreadsFollowTheContainersCap

tcmts.core.ts.testCompilerThreadsFollowTheContainersCap · #teqjmchs · term

import { compilerThreads } from "#codebase/tcmts/core/ts";
import assert from "node:assert/strict";

export const testCompilerThreadsFollowTheContainersCap = () => {
  assert.equal(compilerThreads("1000\n", undefined), 2, "Railway's");
  assert.equal(compilerThreads("4096", undefined), 8);
  assert.equal(compilerThreads("max\n", undefined), undefined, "no cap");
  assert.equal(compilerThreads(undefined, undefined), undefined, "not Linux");
  assert.equal(compilerThreads("1000", "6"), undefined, "GOMAXPROCS set already");
}

uses