mirror of
https://github.com/morluto/rea.git
synced 2026-11-24 13:18:39 +00:00
* refactor(tests): consolidate repeated CLI capture and fixture construction * test(cli): keep overlapping schema and help cases in their existing PR
14 lines
416 B
TypeScript
14 lines
416 B
TypeScript
import { readdir } from "node:fs/promises";
|
|
import { join, sep } from "node:path";
|
|
|
|
export const listFixtureFiles = async (root: string): Promise<string[]> =>
|
|
(await readdir(root, { recursive: true, withFileTypes: true }))
|
|
.filter((entry) => entry.isFile())
|
|
.map((entry) =>
|
|
join(entry.parentPath, entry.name)
|
|
.slice(root.length + 1)
|
|
.split(sep)
|
|
.join("/"),
|
|
)
|
|
.sort();
|