MCPcopy Index your code
hub / github.com/bvaughn/react-virtualized / simulate

Function simulate

source/Table/createMultiSort.jest.js:4–19  ·  view source on GitHub ↗
(
    sort,
    dataKey,
    eventModifier = '',
    defaultSortDirection = 'ASC',
  )

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

sortFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…