mirror of
https://github.com/apache/superset.git
synced 2026-07-08 15:55:33 +00:00
chore(frontend): comprehensive TypeScript quality improvements (#37625)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,13 +72,13 @@ describe('QueryAutoRefresh', () => {
|
||||
});
|
||||
|
||||
test('isQueryRunning returns false for invalid query', () => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(isQueryRunning(null)).toBe(false);
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(isQueryRunning(undefined)).toBe(false);
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(isQueryRunning('I Should Be An Object')).toBe(false);
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(isQueryRunning({ state: { badFormat: true } })).toBe(false);
|
||||
});
|
||||
|
||||
@@ -91,20 +91,19 @@ describe('QueryAutoRefresh', () => {
|
||||
});
|
||||
|
||||
test('shouldCheckForQueries is false for invalid inputs', () => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(shouldCheckForQueries(null)).toBe(false);
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
expect(shouldCheckForQueries(undefined)).toBe(false);
|
||||
expect(
|
||||
// @ts-ignore
|
||||
shouldCheckForQueries({
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
'1234': null,
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
'23425': 'hello world',
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
'345': [],
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
'57346': undefined,
|
||||
}),
|
||||
).toBe(false);
|
||||
@@ -174,7 +173,7 @@ describe('QueryAutoRefresh', () => {
|
||||
|
||||
render(
|
||||
<QueryAutoRefresh
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
queries={{ ...runningQueries, g324t: null }}
|
||||
queriesLastUpdate={queriesLastUpdate}
|
||||
/>,
|
||||
|
||||
Reference in New Issue
Block a user