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

Function assertPathStartWith

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

Source from the content-addressed store, hash-verified

53}
54
55function assertPathStartWith(
56 actual: string,
57 expected: string,
58): SyncExpectationResult {
59 const normalizedReceived = osAgnosticPath(actual);
60 const normalizedExpected = osAgnosticPath(expected);
61
62 const pass = normalizedReceived.startsWith(normalizedExpected);
63 return pass
64 ? {
65 message: () => `expected ${actual} not to start with path ${expected}`,
66 pass: true,
67 actual,
68 expected,
69 }
70 : {
71 message: () => `expected ${actual} to start with path ${expected}`,
72 pass: false,
73 actual,
74 expected,
75 };
76}
77
78function assertPathContain(
79 actual: string,

Callers

nothing calls this directly

Calls 1

osAgnosticPathFunction · 0.90

Tested by

no test coverage detected