Skip to content

Commit

Permalink
test: fix ItwIdentificationModeSelectionScreen test
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoMolinari95 committed Jan 8, 2025
1 parent b72bffd commit 95f5372
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { ItwEidIssuanceMachineContext } from "../../../machine/provider";
import { itwEidIssuanceMachine } from "../../../machine/eid/machine";
import { ItwLifecycleState } from "../../../lifecycle/store/reducers";
import { ToolEnum } from "../../../../../../definitions/content/AssistanceToolConfig";
import { IOStackNavigationProp } from "../../../../../navigation/params/AppParamsList";
import { ItwParamsList } from "../../../navigation/ItwParamsList";

jest.mock("../../../../../config", () => ({
itwEnabled: true
Expand Down Expand Up @@ -128,10 +130,29 @@ describe("ItwIdentificationModeSelectionScreen", () => {
}
});

const mockNavigation = new Proxy(
{},
{
get: (_, prop) => jest.fn()

Check failure on line 136 in ts/features/itwallet/identification/screens/__tests__/ItwIdentificationModeSelectionScreen.test.tsx

View workflow job for this annotation

GitHub Actions / static-checks

'prop' is declared but its value is never read.
}
) as unknown as IOStackNavigationProp<
ItwParamsList,
"ITW_IDENTIFICATION_MODE_SELECTION"
>;

const route = {
key: "ITW_IDENTIFICATION_MODE_SELECTION",
name: ITW_ROUTES.IDENTIFICATION.MODE_SELECTION,
params: {}
};

return renderScreenWithNavigationStoreContext<GlobalState>(
() => (
<ItwEidIssuanceMachineContext.Provider logic={logic}>
<ItwIdentificationModeSelectionScreen />
<ItwIdentificationModeSelectionScreen
navigation={mockNavigation}
route={route}
/>
</ItwEidIssuanceMachineContext.Provider>
),
ITW_ROUTES.IDENTIFICATION.MODE_SELECTION,
Expand Down

0 comments on commit 95f5372

Please sign in to comment.