test(sqllab,extensions): replace any casts with concrete types

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Evan
2026-06-25 07:14:22 -07:00
parent ab9e1d996d
commit 5c38df7d61
3 changed files with 7 additions and 6 deletions

View File

@@ -576,7 +576,8 @@ test('getTabs leaves backendId undefined when the editor has no tabViewId', () =
test('getTabs surfaces the editor tabViewId as the tab backendId', () => {
// Stamp a backend id onto the editor and confirm it flows through to the tab.
(mockStore.getState().sqlLab.queryEditors[0] as any).tabViewId = 'backend-42';
(mockStore.getState().sqlLab.queryEditors[0] as QueryEditor).tabViewId =
'backend-42';
const tab = sqlLab.getCurrentTab();
expect(tab).toBeDefined();

View File

@@ -292,11 +292,11 @@ test('renders children and surfaces a warning toast when init fails', async () =
// The failure must reach the user as a warning toast rather than being
// swallowed silently.
await waitFor(() => {
const toasts = (store.getState() as any).messageToasts;
const { messageToasts } = store.getState() as {
messageToasts: { text: string }[];
};
expect(
toasts.some((toast: { text: string }) =>
/Extensions failed to load/.test(toast.text),
),
messageToasts.some(toast => /Extensions failed to load/.test(toast.text)),
).toBe(true);
});

View File

@@ -80,7 +80,7 @@ const ExtensionsStartup: React.FC<{ children?: React.ReactNode }> = ({
'Extensions initialized successfully.',
),
)
.catch(error => {
.catch((error: unknown) => {
supersetCore.utils.logging.error(
'Error setting up extensions:',
error,