Created
January 31, 2022 18:02
-
-
Save niemyjski/9dbdd6afcc93f43f6198771ecdadeae2 to your computer and use it in GitHub Desktop.
React Exceptionless Jest Mock (Jest doesn't yet support esm modules).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ClassAttributes, HTMLAttributes } from "react"; | |
jest.mock("@exceptionless/react", () => { | |
return { | |
__esModule: true, | |
Exceptionless: { | |
startup: jest.fn() | |
}, | |
ExceptionlessErrorBoundary: (props: JSX.IntrinsicAttributes & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>) => { | |
return <div {...props} />; | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment