MCPcopy
hub / github.com/Comcast/react-data-grid / run

Function run

test/browser/columnOrder.test.tsx:32–53  ·  view source on GitHub ↗
(columns: readonly Column<unknown>[])

Source from the content-addressed store, hash-verified

30 const rows: readonly unknown[] = [];
31
32 async function run(columns: readonly Column<unknown>[]) {
33 let unmount;
34 if (groupBy === undefined) {
35 ({ unmount } = await page.render(<DataGrid columns={columns} rows={rows} />));
36 } else {
37 ({ unmount } = await page.render(
38 <TreeDataGrid
39 columns={columns}
40 rows={rows}
41 groupBy={groupBy}
42 rowGrouper={() => ({})}
43 expandedGroupIds={new Set()}
44 onExpandedGroupIdsChange={() => {}}
45 />
46 ));
47 }
48
49 const headerCells = page.getByRole('columnheader');
50 await testCount(headerCells, expected.length);
51 expect(headerCells.elements().map((c) => c.textContent)).toStrictEqual(expected);
52 await unmount();
53 }
54
55 let expected: readonly string[] = ['', 'frz1', 'frz2', 'std1', 'std2'];
56 let groupBy: readonly string[] | undefined;

Callers 1

Calls 1

testCountFunction · 0.90

Tested by

no test coverage detected