diff --git a/src/stories/Question.stories.tsx b/src/stories/Question.stories.tsx index f509b952..4b7aaa73 100644 --- a/src/stories/Question.stories.tsx +++ b/src/stories/Question.stories.tsx @@ -13,6 +13,7 @@ import question from "./assets/question/question.json"; import answerableQuestion from "./assets/question/answerableQuestion.json"; import answerableQuestionExpanded from "./assets/question/answerableQuestionExpanded.json"; import queryString from "query-string"; +import IntlContextProvider from "../contexts/IntlContextProvider"; export default { title: "Components/Question", @@ -73,6 +74,11 @@ const Template: ComponentStory = ( }; const mapComponent = _getComponentMappingFunction(); const getOptions = (id: number) => options[id] || []; + const Intl = jest.genMockFromModule("react-intl"); // <-- This is the change + + const intl = { + formatMessage: ({ defaultMessage }) => defaultMessage, + }; return ( = ( }} > - {}} /> + {}} intl={intl} /> );