UNPKG

@lou.codes/test

Version:

✅ Equality test with enforced readability

27 lines (26 loc) 766 B
import type { IsomorphicIterable } from "@lou.codes/types"; import type { TestTuple } from "../TestTuple.js"; /** * Run tests in given iterable of urls and test objects and return a string with * the results. * * @category Output * @category Test * @example * ```typescript * runAndStringifyTests([ * "file:///tests/example.test.ts", * { * given: "🟢", * must: "🟩", * received: () => "🟩", * wanted: () => "🟩", * }, * ]); * // ❯ file:///tests/example.test.ts * // ✓ Given 🟢, must 🟩. * ``` * @param testTuples Iterable of test tuples. * @yields Strings to be shown to the consumer. */ export declare const runAndStringifyTests: (testTuples: IsomorphicIterable<TestTuple>) => AsyncGenerator<string, void, unknown>;