( parentDir: string, rootPath: string, expectedPaths: string[], options?: WalkOptions, )
| 12 | const testdataDir = resolve(fromFileUrl(import.meta.url), "../testdata/walk"); |
| 13 | |
| 14 | async function assertWalkPaths( |
| 15 | parentDir: string, |
| 16 | rootPath: string, |
| 17 | expectedPaths: string[], |
| 18 | options?: WalkOptions, |
| 19 | ) { |
| 20 | const root = resolve(parentDir, rootPath); |
| 21 | const entries = await Array.fromAsync(walk(root, options)); |
| 22 | |
| 23 | const expected = expectedPaths.map((path) => resolve(root, path)); |
| 24 | assertEquals(entries.length, expected.length); |
| 25 | assertArrayIncludes(entries.map(({ path }) => path), expected); |
| 26 | } |
| 27 | |
| 28 | function assertWalkSyncPaths( |
| 29 | parentDir: string, |
no test coverage detected