@lou.codes/test
Version:
✅ Equality test with enforced readability
22 lines (21 loc) • 536 B
TypeScript
import type { TestResult } from "./TestResult.js";
/**
* Takes a `TestResult` and returns a readable string..
*
* @category Output
* @example
* ```typescript
* stringifyTest({
* given: "🟢",
* must: "🟩",
* }); // "✓ Given 🟢, does 🟩."
* stringifyTest({
* differences: […],
* given: "🟢",
* must: "🟩",
* }); // "× Given 🟢, must 🟩, but…"
* ```
* @param testResult Test result object.
* @returns Readable string.
*/
export declare const stringifyTest: (testResult: TestResult) => string;