MCPcopy Create free account
hub / github.com/code-pushup/cli / assertPathMatch

Function assertPathMatch

testing/test-setup/src/lib/extend/path.matcher.ts:32–53  ·  view source on GitHub ↗
(
  actual: string,
  expected: string,
)

Source from the content-addressed store, hash-verified

30});
31
32function assertPathMatch(
33 actual: string,
34 expected: string,
35): SyncExpectationResult {
36 const normalizedReceived = osAgnosticPath(actual);
37 const normalizedExpected = osAgnosticPath(expected);
38
39 const pass = normalizedReceived === normalizedExpected;
40 return pass
41 ? {
42 message: () => `expected ${actual} not to match path ${expected}`,
43 pass: true,
44 actual,
45 expected,
46 }
47 : {
48 message: () => `expected ${actual} to match path ${expected}`,
49 pass: false,
50 actual,
51 expected,
52 };
53}
54
55function assertPathStartWith(
56 actual: string,

Callers

nothing calls this directly

Calls 1

osAgnosticPathFunction · 0.90

Tested by

no test coverage detected