Reference
chloejs/test
Saying whether one thing came out right, for a job's own test file.
Saying whether one thing came out right, and counting what did not.
This is what chloe/test means. It is its own file rather than part of
test.ts because test.ts runs its cases as it loads, and a test file that
imported it to get these two would run the whole suite again.
A job is code, so it is tested rather than scored. A test file sits beside
the job it is about, is named <job>.test.ts, and runs its cases as it
loads:
import { about, is } from "chloejs/test";
about("what the nightly backup calls wrong");
is("a night like the last one says nothing", whatLooksWrong(tonight, good, 10), []);The runner finds it, so there is nothing to add anywhere else.
aboutfunction
export function about(what: string): voidThe heading a group of cases runs under.
failedfunction
export function failed(): numberHow many cases failed, across every file the runner loaded.
isfunction
export function is(what: string, got: unknown, want: unknown): voidCompared as JSON, so two objects of the same shape are the same answer.