bito-code-review[bot] commented on code in PR #40866:
URL: https://github.com/apache/superset/pull/40866#discussion_r3376765234
##########
superset-websocket/spec/index.test.ts:
##########
@@ -313,7 +367,9 @@ describe('server', () => {
test('success with results', async () => {
mockRedisXrange.mockResolvedValueOnce(streamReturnValue);
- const cb = jest.fn();
+ const cb = jest.fn() as jest.MockedFunction<
+ (results: server.StreamResult[]) => void
+ >;
Review Comment:
<!-- Bito Reply -->
The update correctly aligns the mock function signatures with the
`ListenerFunction` contract by including `| Promise<void>` in the return type.
This ensures that the tests accurately reflect the asynchronous nature of the
listeners used in the implementation.
**superset-websocket/spec/index.test.ts**
```
const cb = jest.fn() as jest.MockedFunction<
(results: server.StreamResult[]) => void | Promise<void>
>;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]