( actual: string, expected: string, )
| 53 | } |
| 54 | |
| 55 | function 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 | |
| 78 | function assertPathContain( |
| 79 | actual: string, |
nothing calls this directly
no test coverage detected