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

Function areVolumesEqual

packages/expect/src/__tests__/customEqualityTesters.test.ts:44–58  ·  view source on GitHub ↗
(
  a: unknown,
  b: unknown,
)

Source from the content-addressed store, hash-verified

42}
43
44const areVolumesEqual: Tester = (
45 a: unknown,
46 b: unknown,
47): boolean | undefined => {
48 const isAVolume = isVolume(a);
49 const isBVolume = isVolume(b);
50
51 if (isAVolume && isBVolume) {
52 return a.equals(b);
53 } else if (isAVolume === isBVolume) {
54 return undefined;
55 } else {
56 return false;
57 }
58};
59
60function* toIterator<T>(array: Array<T>): Iterator<T> {
61 for (const obj of array) {

Callers

nothing calls this directly

Calls 2

isVolumeFunction · 0.85
equalsMethod · 0.80

Tested by

no test coverage detected