MCPcopy
hub / github.com/bvaughn/react-window / createTestHelper

Function createTestHelper

lib/core/getOffsetForIndex.test.ts:32–47  ·  view source on GitHub ↗
(align: Align)

Source from the content-addressed store, hash-verified

30
31 describe("align", () => {
32 function createTestHelper(align: Align) {
33 return function testHelperAuto(
34 index: number,
35 expectedOffset: number,
36 containerScrollOffset: number = 0
37 ) {
38 expect(
39 getOffsetForIndex({
40 ...DEFAULT_ARGS,
41 align,
42 index,
43 containerScrollOffset
44 })
45 ).toBe(expectedOffset);
46 };
47 }
48
49 test("auto", () => {
50 const testHelper = createTestHelper("auto");

Callers 1

Calls 1

getOffsetForIndexFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…