MCPcopy
hub / github.com/streamlit/streamlit / assertCallbacks

Function assertCallbacks

frontend/lib/src/WidgetStateManager.test.ts:107–125  ·  view source on GitHub ↗
({
    insideForm,
  }: {
    insideForm: boolean
  })

Source from the content-addressed store, hash-verified

105
106 /** Assert calls of our callback functions. */
107 const assertCallbacks = async ({
108 insideForm,
109 }: {
110 insideForm: boolean
111 }): Promise<void> => {
112 if (insideForm) {
113 expect(sendBackMsg).not.toHaveBeenCalled()
114 } else {
115 await waitFor(() => {
116 expect(sendBackMsg).toHaveBeenCalledTimes(1)
117 expect(sendBackMsg).toHaveBeenCalledWith(
118 expect.anything(),
119 undefined, // fragmentId
120 undefined,
121 undefined
122 )
123 })
124 }
125 }
126
127 it.each([false, true])(
128 "sets string value correctly (insideForm=%s)",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…