( actual: string, expected: string, )
| 76 | } |
| 77 | |
| 78 | function 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 | |
| 101 | function assertPathEndWith( |
| 102 | actual: string, |
nothing calls this directly
no test coverage detected