(received, inlineSnapshot, fromPromise)
| 441 | Context, |
| 442 | [inlineSnapshot?: string, fromPromise?: boolean] |
| 443 | > = function (received, inlineSnapshot, fromPromise) { |
| 444 | const matcherName = 'toThrowErrorMatchingInlineSnapshot'; |
| 445 | |
| 446 | if (inlineSnapshot !== undefined && typeof inlineSnapshot !== 'string') { |
| 447 | const options: MatcherHintOptions = { |
| 448 | expectedColor: noColor, |
| 449 | isNot: this.isNot, |
| 450 | promise: this.promise, |
| 451 | }; |
| 452 | |
| 453 | throw new Error( |
| 454 | matcherErrorMessage( |
| 455 | matcherHint(matcherName, undefined, SNAPSHOT_ARG, options), |
| 456 | 'Inline snapshot must be a string', |
| 457 | printWithType('Inline snapshot', inlineSnapshot, serialize), |
| 458 | ), |
| 459 | ); |
| 460 | } |
| 461 | |
| 462 | return _toThrowErrorMatchingSnapshot( |
| 463 | { |
| 464 | context: this, |
| 465 | inlineSnapshot: |
| 466 | inlineSnapshot === undefined |
| 467 | ? undefined |
| 468 | : stripAddedIndentation(inlineSnapshot), |
| 469 | isInline: true, |
| 470 | matcherName, |
| 471 | received, |
| 472 | }, |
| 473 | fromPromise, |
| 474 | ); |
| 475 | }; |
| 476 | |
| 477 | const _toThrowErrorMatchingSnapshot = ( |
| 478 | config: MatchSnapshotConfig, |
nothing calls this directly
no test coverage detected