Skip to content

Commit

Permalink
Stub react-markdown to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antw committed Sep 29, 2022
1 parent 2032678 commit 401ed03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
import "@testing-library/jest-dom/extend-expect";

// Stub out react-markdown which doesn't work in Jest due to Jest's support for ESM.
// https://github.com/remarkjs/react-markdown/issues/635
// eslint-disable-next-line react/display-name
jest.mock("react-markdown", () => (props) => {
return <>{props.children}</>;
});

jest.mock("remark-gfm", () => undefined);

0 comments on commit 401ed03

Please sign in to comment.