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

Function assertPathEndWith

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

Source from the content-addressed store, hash-verified

99}
100
101function assertPathEndWith(
102 actual: string,
103 expected: string,
104): SyncExpectationResult {
105 const normalizedReceived = osAgnosticPath(actual);
106 const normalizedExpected = osAgnosticPath(expected);
107
108 const pass = normalizedReceived.endsWith(normalizedExpected);
109 return pass
110 ? {
111 message: () => `expected ${actual} not to end with path ${expected}`,
112 pass: true,
113 actual,
114 expected,
115 }
116 : {
117 message: () => `expected ${actual} to end with path ${expected}`,
118 pass: false,
119 actual,
120 expected,
121 };
122}

Callers

nothing calls this directly

Calls 1

osAgnosticPathFunction · 0.90

Tested by

no test coverage detected