MCPcopy
hub / github.com/Effect-TS/effect / assertSingleChunk

Function assertSingleChunk

packages/effect/test/Iterable.test.ts:356–363  ·  view source on GitHub ↗
(
      input: Iterable<number>,
      n: number
    )

Source from the content-addressed store, hash-verified

354 deepStrictEqual(toArray(Iter.chunksOf(-1)([1, 2, 3, 4, 5])), [[1], [2], [3], [4], [5]])
355
356 const assertSingleChunk = (
357 input: Iterable<number>,
358 n: number
359 ) => {
360 const chunks = toArray(Iter.chunksOf(n)(input))
361 strictEqual(chunks.length, 1)
362 deepStrictEqual(chunks[0], input)
363 }
364 // n = length
365 assertSingleChunk([1, 2], 2)
366 // n out of bounds

Callers 1

Iterable.test.tsFile · 0.70

Calls 3

strictEqualFunction · 0.90
deepStrictEqualFunction · 0.90
toArrayFunction · 0.70

Tested by

no test coverage detected