( actual: string, expected: string, )
| 99 | } |
| 100 | |
| 101 | function 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 | } |
nothing calls this directly
no test coverage detected