diff options
author | 2025-08-08 23:43:04 +0100 | |
---|---|---|
committer | 2025-08-08 23:43:04 +0100 | |
commit | 26b3cd733412ce2d9df37a42204ce7242c4d9647 (patch) | |
tree | 323035ee05297c25e147db9b34c8f73f73c5cd59 | |
parent | Checkout code in CI (diff) |
-rw-r--r-- | jest.config.js | 1 | ||||
-rw-r--r-- | src/__mocks__/react-markdown.tsx | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js index daadd49..e14046b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,6 +4,7 @@ module.exports = { }, moduleNameMapper: { '\\.svg$': '<rootDir>/src/tests/__mocks__/svg.ts', + "^react-markdown$": "<rootDir>/src/__mocks__/react-markdown.tsx", }, collectCoverageFrom: [ "src/**/*.{js,jsx,ts,tsx}", diff --git a/src/__mocks__/react-markdown.tsx b/src/__mocks__/react-markdown.tsx new file mode 100644 index 0000000..678cf61 --- /dev/null +++ b/src/__mocks__/react-markdown.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +interface ReactMarkdownProps { + children: string; + [key: string]: any; +} + +const ReactMarkdown: React.FC<ReactMarkdownProps> = ({ children }) => { + return <div data-testid="react-markdown">{children}</div>; +}; + +export default ReactMarkdown; |