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

Function countItemsNegativeZero

packages/diff-sequences/src/__tests__/index.test.ts:280–293  ·  view source on GitHub ↗
(aLength: number, bLength: number)

Source from the content-addressed store, hash-verified

278
279 describe('negative zero is equivalent to zero for length', () => {
280 const countItemsNegativeZero = (aLength: number, bLength: number) => {
281 let n = 0;
282 diff(
283 aLength,
284 bLength,
285 () => {
286 throw new Error('input function should not have been called');
287 },
288 nCommon => {
289 n += nCommon;
290 },
291 );
292 return n;
293 };
294
295 test('of a', () => {
296 expect(countItemsNegativeZero(-0, 1)).toBe(0);

Callers 1

index.test.tsFile · 0.85

Calls 1

diffFunction · 0.50

Tested by

no test coverage detected