rusackas commented on code in PR #40866:
URL: https://github.com/apache/superset/pull/40866#discussion_r3376764611
##########
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:
Good catch - aligned the mock signatures with the actual `ListenerFunction`
contract (`(results: StreamResult[]) => void | Promise<void>`) across all three
test cases so async listeners are correctly typed now that
`fetchRangeFromStream`/`subscribeToGlobalStream` await the listener.
--
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]