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

Function assertPathContain

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

Source from the content-addressed store, hash-verified

76}
77
78function assertPathContain(
79 actual: string,
80 expected: string,
81): SyncExpectationResult {
82 const normalizedReceived = osAgnosticPath(actual);
83 const normalizedExpected = osAgnosticPath(expected);
84
85 const pass = normalizedReceived.includes(normalizedExpected);
86 return pass
87 ? {
88 message: () => `expected ${actual} not to contain path ${expected}`,
89 pass: true,
90 actual,
91 expected,
92 }
93 : {
94 message: () => `expected ${actual} to contain path ${expected}`,
95 pass: false,
96 actual,
97 expected,
98 };
99}
100
101function assertPathEndWith(
102 actual: string,

Callers

nothing calls this directly

Calls 1

osAgnosticPathFunction · 0.90

Tested by

no test coverage detected