Skip to content

Commit

Permalink
fix: [IA-741] Test failing on MessageRouterScreen (#3844)
Browse files Browse the repository at this point in the history
* Fix MessageRouterScreen tests

* Fix tests folder name

* Fix test on MessageRouterScreen

Co-authored-by: fabriziofff <[email protected]>
  • Loading branch information
emiliopavia and fabriziofff authored Mar 17, 2022
1 parent 05e7b10 commit cddd21a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jest.useFakeTimers();

const mockNavDispatch = jest.fn();

jest.mock("../../../../config", () => ({ euCovidCertificateEnabled: true }));
jest.mock("../../../../config", () => ({
euCovidCertificateEnabled: true,
pageSize: 8,
maximumItemsFromAPI: 8
}));
jest.mock("../../../../utils/hooks/useOnFocus", () => ({
useNavigationContext: () => ({
dispatch: mockNavDispatch,
Expand Down Expand Up @@ -192,8 +196,8 @@ type InputState = {
const renderComponent = (messageId: string, state: InputState = {}) => {
const globalState = appReducer(undefined, applicationChangeState("active"));
const allPaginated = {
inbox: pot.none,
lastRequest: none,
inbox: { data: pot.none, lastRequest: none },
archive: { data: pot.none, lastRequest: none },
...state.allPaginated
};
const detailsById = state.detailsById ?? {};
Expand Down

0 comments on commit cddd21a

Please sign in to comment.