(refs: Array<{fileName: string}>, expectedFileNames: string[])
| 17 | * This assertion is independent of the order of either list. |
| 18 | */ |
| 19 | export function assertFileNames(refs: Array<{fileName: string}>, expectedFileNames: string[]) { |
| 20 | const actualPaths = refs.map((r) => r.fileName); |
| 21 | const actualFileNames = actualPaths.map((p) => last(p.split('/'))); |
| 22 | expect(new Set(actualFileNames)).toEqual(new Set(expectedFileNames)); |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Expect that a list of objects with a `fileName` property matches a set |
no test coverage detected
searching dependent graphs…