MCPcopy Create free account
hub / github.com/bvaughn/react-window / createTestHelper

Function createTestHelper

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

Source from the content-addressed store, hash-verified

78 );
79
80 function createTestHelper(align: Align) {
81 return function testHelperAuto(
82 index: number,
83 expectedOffset: number,
84 containerScrollOffset: number = 0
85 ) {
86 expect(
87 getOffsetForIndex({
88 ...DEFAULT_ARGS,
89 align,
90 index,
91 containerScrollOffset
92 })
93 ).toBe(expectedOffset);
94 };
95 }
96
97 test("auto", () => {
98 const testHelper = createTestHelper("auto");

Callers 1

Calls 1

getOffsetForIndexFunction · 0.90

Tested by

no test coverage detected