MCPcopy Index your code
hub / github.com/angular/angular / assertFileNames

Function assertFileNames

packages/language-service/testing/src/util.ts:19–23  ·  view source on GitHub ↗
(refs: Array<{fileName: string}>, expectedFileNames: string[])

Source from the content-addressed store, hash-verified

17 * This assertion is independent of the order of either list.
18 */
19export 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

Calls 2

mapMethod · 0.80
lastFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…