bito-code-review[bot] commented on code in PR #36760:
URL: https://github.com/apache/superset/pull/36760#discussion_r2644008962
##########
superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts:
##########
@@ -232,7 +232,8 @@ test('returns column keywords among selected tables', async
() => {
);
storeWithSqlLab.dispatch(
addTable(
- { id: expectQueryEditorId },
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ { id: expectQueryEditorId } as any,
Review Comment:
<!-- Bito Reply -->
The suggestion recommends replacing the partial mock object with a full
QueryEditor to avoid type assertions and potential runtime issues where state
lookups might fail. However, using partial mocks with only the necessary 'id'
property is a common testing practice that keeps tests focused and
maintainable, especially since the hook's behavior depends solely on that
identifier. Full objects could introduce irrelevant complexity without adding
value to this specific test.
--
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]