chloejsnpm i chloejs

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.

aboutfailedis

aboutfunction

export function about(what: string): void

The heading a group of cases runs under.

chloe/ops/check.ts:21

failedfunction

export function failed(): number

How many cases failed, across every file the runner loaded.

chloe/ops/check.ts:35

isfunction

export function is(what: string, got: unknown, want: unknown): void

Compared as JSON, so two objects of the same shape are the same answer.

chloe/ops/check.ts:26