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

Method fail

packages/jest-snapshot/src/State.ts:316–327  ·  view source on GitHub ↗
(testName: string, _received: unknown, key?: string)

Source from the content-addressed store, hash-verified

314 }
315
316 fail(testName: string, _received: unknown, key?: string): string {
317 this._counters.set(testName, (this._counters.get(testName) || 0) + 1);
318 const count = Number(this._counters.get(testName));
319
320 if (!key) {
321 key = testNameToKey(testName, count);
322 }
323
324 this._uncheckedKeys.delete(key);
325 this.unmatched++;
326 return key;
327 }
328}

Callers 7

asyncJestLifecycleFunction · 0.80
asyncJestTestFunction · 0.80
_toMatchSnapshotFunction · 0.80
promiseIt.test.jsFile · 0.80
index.jsFile · 0.80

Calls 4

testNameToKeyFunction · 0.90
deleteMethod · 0.80
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected