Skip to content

Commit

Permalink
Remove any types
Browse files Browse the repository at this point in the history
  • Loading branch information
timvanoostrom committed Jan 9, 2025
1 parent 6eff5c3 commit c43a05a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/client/hooks/useAppState.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import {
} from './useAppState';
import * as sseHook from './useSSE';
import { SSE_ERROR_MESSAGE } from './useSSE';
import { renderRecoilHook } from '../../testing/render-recoil.hook';
import { FeatureToggle } from '../../universal/config/feature-toggles';
import {
apiPristineResult,
apiSuccessResult,
} from '../../universal/helpers/api';
import * as appStateModule from '../AppState';
import * as Monitoring from '../helpers/monitoring';
import { renderRecoilHook } from '../../testing/render-recoil.hook';

vi.mock('./api/useTipsApi');
vi.mock('./useProfileType');
Expand Down Expand Up @@ -155,18 +155,18 @@ describe('useAppState', () => {
describe('isAppStateReady', () => {
const pristineState = {
TEST: apiPristineResult(null, { profileTypes: ['private'] }),
} as any;
};

it('Should initially be false', async () => {
const appState = { TEST: pristineState.TEST } as any;
const appState = { TEST: pristineState.TEST };

const isReady = isAppStateReady(appState, pristineState, 'private');
expect(isReady).toBe(false);
});

it('Should be true if we have proper data', async () => {
const isReady = isAppStateReady(
{ TEST: apiSuccessResult('test') } as any,
{ TEST: apiSuccessResult('test') },
pristineState,
'private'
);
Expand All @@ -175,7 +175,7 @@ describe('useAppState', () => {

it('Should be false if we have proper data but a different profile type', async () => {
const isReady = isAppStateReady(
{ TEST: apiSuccessResult('test') } as any,
{ TEST: apiSuccessResult('test') },
pristineState,
'commercial'
);
Expand All @@ -185,7 +185,7 @@ describe('useAppState', () => {
it('Should be false if we have statekey mismatch', async () => {
const spy = vi.spyOn(Monitoring, 'captureMessage');
const isReady = isAppStateReady(
{ BLAP: apiSuccessResult('blap') } as any,
{ BLAP: apiSuccessResult('blap') },
pristineState,
'private'
);
Expand Down

0 comments on commit c43a05a

Please sign in to comment.