MCPcopy
hub / github.com/jestjs/jest / createToThrowErrorMatchingSnapshotMatcher

Function createToThrowErrorMatchingSnapshotMatcher

packages/expect/src/index.ts:80–90  ·  view source on GitHub ↗
(
  matcher: RawMatcherFn,
)

Source from the content-addressed store, hash-verified

78}
79
80const createToThrowErrorMatchingSnapshotMatcher = function (
81 matcher: RawMatcherFn,
82) {
83 return function (
84 this: MatcherContext,
85 received: any,
86 testNameOrInlineSnapshot?: string,
87 ) {
88 return matcher.apply(this, [received, testNameOrInlineSnapshot, true]);
89 };
90};
91
92const getPromiseMatcher = (name: string, matcher: RawMatcherFn) => {
93 if (name === 'toThrow') {

Callers 1

getPromiseMatcherFunction · 0.85

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected