(result: SyncExpectationResult, customMessage?: string)
| 305 | } |
| 306 | |
| 307 | function assertMatchResult(result: SyncExpectationResult, customMessage?: string): void { |
| 308 | if (!result.pass) { |
| 309 | const errorMessage = (customMessage ? `${customMessage}: ` : '') + result.message() |
| 310 | throw Object.assign(new Error(errorMessage), { |
| 311 | actual: result.actual, |
| 312 | expected: result.expected, |
| 313 | diffOptions: { |
| 314 | expand: getWorkerState().config.snapshotOptions.expand, |
| 315 | }, |
| 316 | }) |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * Composable snapshot matcher helpers for building custom snapshot matchers |
no test coverage detected