MCPcopy
hub / github.com/locustio/locust / renderWithProvider

Function renderWithProvider

locust/webui/src/test/testUtils.tsx:15–24  ·  view source on GitHub ↗
(Component: React.ReactElement, initialState = {})

Source from the content-addressed store, hash-verified

13 });
14
15export const renderWithProvider = (Component: React.ReactElement, initialState = {}) => {
16 const store = createStore(initialState);
17
18 const renderResult = render(<Provider store={store}>{Component}</Provider>);
19
20 return {
21 ...renderResult,
22 store,
23 };
24};

Callers 15

App.test.tsxFile · 0.90
DataTable.test.tsxFile · 0.90
Reports.test.tsxFile · 0.90
LogViewer.test.tsxFile · 0.90
SwarmForm.test.tsxFile · 0.90

Calls 1

createStoreFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…