UNPKG

@lou.codes/test

Version:

✅ Equality test with enforced readability

28 lines (27 loc) 745 B
import type { ReadOnlyURL } from "./ReadOnlyURL.js"; /** * Import a file that exports a `Test` or an Iterable of `Test`. * * @category File System * @example * ```typescript * testImport(new URL("file:///example/test.test.js")); * // AsyncIterable<[ * // { * // given: "example 1", * // must: "example 1", * // received: () => "value 1", * // wanted: () => "value 1" * // }, * // { * // given: "example 2", * // must: "example 2", * // received: () => "value 2", * // wanted: () => "value 2" * // }, * // ]> * ``` * @param path Path to the test file. * @yields Imported tests. */ export declare const importTest: (url: ReadOnlyURL) => AsyncGenerator<import("./Test.js").Test<unknown>, void, unknown>;