Skip to content

Instantly share code, notes, and snippets.

@icodejs
Created March 24, 2021 09:11
Show Gist options
  • Save icodejs/ac051c12202dba858e5d81faa4f19b39 to your computer and use it in GitHub Desktop.
Save icodejs/ac051c12202dba858e5d81faa4f19b39 to your computer and use it in GitHub Desktop.
Mocking React Components with Jest
jest.mock("../src/Icon", () => {
return {
__esModule: true,
namedExport: true,
default: () => {
return <div></div>;
},
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment