mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 13:51:48 +00:00
Migrated ErrorHandler test to react testing library
This commit is contained in:
@@ -6,10 +6,10 @@ interface ErrorHandlerState {
|
||||
hasError: boolean;
|
||||
}
|
||||
|
||||
const ErrorHandlerCreator = (
|
||||
export const ErrorHandler = (
|
||||
{ location }: Window,
|
||||
{ error }: Console,
|
||||
) => class ErrorHandler extends Component<any, ErrorHandlerState> {
|
||||
) => class extends Component<any, ErrorHandlerState> {
|
||||
public constructor(props: object) {
|
||||
super(props);
|
||||
this.state = { hasError: false };
|
||||
@@ -44,5 +44,3 @@ const ErrorHandlerCreator = (
|
||||
return children;
|
||||
}
|
||||
};
|
||||
|
||||
export default ErrorHandlerCreator;
|
||||
|
||||
Reference in New Issue
Block a user