Skip to content

Commit

Permalink
Unngå at tekster ikke er en funksjon i tester
Browse files Browse the repository at this point in the history
  • Loading branch information
kristeine committed Mar 21, 2024
1 parent ae0b24c commit 2028bbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend/utils/testing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { AlternativtSvarForInput } from '../typer/common';
import { ESivilstand, ESøknadstype, Slektsforhold } from '../typer/kontrakt/generelle';
import { IKvittering } from '../typer/kvittering';
import { ISøker, ISøkerRespons } from '../typer/person';
import { ESanitySteg } from '../typer/sanity/sanity';
import { initialStateSøknad, ISøknad } from '../typer/søknad';
import { Årsak } from '../typer/utvidet';

Expand Down Expand Up @@ -102,6 +103,8 @@ export const spyOnUseApp = søknad => {
systemetOK: () => jest.fn().mockReturnValue(true),
systemetFeiler: jest.fn().mockReturnValue(false),
fåttGyldigKvittering: søknad.fåttGyldigKvittering === true,
tekster: jest.fn().mockReturnValue({ [ESanitySteg.FELLES]: {}, [ESanitySteg.FORSIDE]: {} }),
plainTekst: jest.fn().mockReturnValue('tekst fra sanity'),
});

jest.spyOn(appContext, 'useApp').mockImplementation(useAppMock);
Expand Down

0 comments on commit 2028bbb

Please sign in to comment.