@lou.codes/test
Version:
✅ Equality test with enforced readability
14 lines (13 loc) • 520 B
TypeScript
import type { ReadOnlyURL } from "../ReadOnlyURL.js";
import type { ReadOnlyURLs } from "../ReadOnlyURLs.js";
/**
* Takes an iterable of URLs and only yields the ones that finish with `.test.*`.
*
* @example
* ```typescript
* filterTestFilePaths(["/path/to/tests/a.test.js", "/path/to/tests/b.ts"]); // ["/path/to/tests/a.test.js"]
* ```
* @param readOnlyURLs Iterable of URLs.
* @yields Test URLs.
*/
export declare const filterTestFilePaths: (readOnlyURLs: ReadOnlyURLs) => AsyncGenerator<ReadOnlyURL, void>;