MCPcopy Create free account
hub / github.com/bvaughn/react-virtualized / simulate

Function simulate

lib/components/Table/createMultiSort.test.ts:6–21  ·  view source on GitHub ↗
(
    sort: MultiSortReturn["sort"],
    dataKey: string,
    eventModifier = "",
    defaultSortDirection: SortDirectionType = "ASC"
  )

Source from the content-addressed store, hash-verified

4
5describe("createMultiSort", () => {
6 function simulate(
7 sort: MultiSortReturn["sort"],
8 dataKey: string,
9 eventModifier = "",
10 defaultSortDirection: SortDirectionType = "ASC"
11 ) {
12 sort({
13 defaultSortDirection,
14 event: {
15 ctrlKey: eventModifier === "control",
16 metaKey: eventModifier === "meta",
17 shiftKey: eventModifier === "shift"
18 },
19 sortBy: dataKey
20 });
21 }
22
23 it("errors if the user did not specify a sort callback", () => {
24 expect(createMultiSort).toThrow();

Callers 1

Calls 1

sortFunction · 0.70

Tested by

no test coverage detected