tcmts.cli.test.e2e.suites

Server

runInBudget (dir: string, slotsDir: string, slots: number, log: string) => Promise<{ status: number | null; out…
`tcm test` in `dir`, in a budget of `slots` slots (in `slotsDir`), its output (stdout and stderr) as it came.
slowSuites (name: string, n: number, ms: number) => string
A codebase whose package has `n` suites, each noting in SLOT_LOG when it starts and ends (`<ms> + <name>`, `<ms> - <name>`) and taking `ms` between.

Tests

testBuildsWaitForASlot () => Promise<void>
A build of an app takes a slot of the machine's, as tests do: with the one slot held by other work (another branch's verify), `tcm build` waits, saying on whom, and builds once it's given back, leaving the slots as they were.
testRunKeepsACommandTheCallerSet () => void
`tcm run` gives what it runs the codebase's commands (`<COMMAND>_BIN`), but one the caller set is kept, and said: an end-to-end test run against another build (`TCM_BIN=<tcm.js> tcm run <test>`). One a `tcm run` further out set (`TCM_COMMANDS`), the build as it was then, is replaced, as is one of the codebase's own runners (a tcm run further out made it, though a tcm from before TCM_COMMANDS doesn't say so).
testStoppedTcmStillReportsWhatItRan () => Promise<void>
A tcm a test stops with a signal (the language server it started) still says what code it ran: a suite's cached result is only as good as that, and V8 writes coverage on exit, not when a signal ends the process.
testSuiteRunKeepsWhatASaveReplacedMeanwhile () => Promise<void>
A definition a save replaces while a suite runs is still part of what the run executed: its result holds only for that version of it. (A run used to lose what no name pointed at by the time it ended, and then held for every later version of it.)
testSuiteSlotsAreSharedByEveryRun () => Promise<void>
Every tcm running suites on a machine takes them from one budget (TCM_SUITE_SLOTS, in TCM_SLOTS_DIR): two `tcm test` runs of two codebases at once never have more suites running between them than it allows, and one waiting says so, and on what.
testSuitesAgainstPackedBuild () => void
Suites run against another build of the command (a package packed from the codebase); what tcm runs gets the codebase's commands. A result is the code the suite ran's, whichever build ran it: it holds against the codebase's own build and any package with that code, though the bin moves with any change its entry reaches; a build without the code (one packed before a change) runs the suite.
testSuitesFollowMethodsAndConstantsTheyRead () => void
What a suite ran, finer than definitions where a definition is big: a class by the methods it used (a change to another of its methods keeps the result), and a written-out constant only when code that ran reads it (one that was only loaded keeps it).
testSuitesOrDefinitionsAlone () => void
`--suites` runs a package's suites alone, and `--definitions` the test definitions alone (as a verify's package stage and its tests stage do, side by side); asking for both is refused, as it would run nothing.
testSuitesRunAgainOnlyWhenCodeTheyRanChanged () => void
A package's suites run its command, and run again only when code they ran changed; a result holds again when that code is back as it was.
testUnreadComputedConstantsKeepResults () => void
A constant whose value is computed doing nothing else counts for a suite only when code it ran refers to it: a change to one the command loads and doesn't read (its help) keeps the result, and a change to one it reads runs the suite again.
testWaitingForSlotsIsSaidBriefly () => Promise<void>
A run waiting for slots says so briefly: when it starts waiting (with what sets how many there are) and how long it took, not each time it waits again soon after; and its summary says how long it waited in all.