From f16799a375859d07ef6bcb2980f8f826376abb65 Mon Sep 17 00:00:00 2001 From: mihailgaberov Date: Sun, 31 Dec 2023 16:29:28 +0100 Subject: [PATCH] :recycle: update tests to use vitest and react-testing-library --- src/components/UserProfile/UserProfile.test.tsx | 2 +- src/components/UserProfile/UserProfile.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/UserProfile/UserProfile.test.tsx b/src/components/UserProfile/UserProfile.test.tsx index 4f11849..e671dce 100644 --- a/src/components/UserProfile/UserProfile.test.tsx +++ b/src/components/UserProfile/UserProfile.test.tsx @@ -6,7 +6,7 @@ import { UserProfile } from './UserProfile'; import translationsMock from '../../translations/translations-mock'; const setup = () => { - return render( {}}/>) + return render(''}/>) }; describe('UserProfile component', () => { diff --git a/src/components/UserProfile/UserProfile.tsx b/src/components/UserProfile/UserProfile.tsx index 29241c9..4b2876a 100644 --- a/src/components/UserProfile/UserProfile.tsx +++ b/src/components/UserProfile/UserProfile.tsx @@ -10,7 +10,7 @@ interface IUserProfileState { username: string; } -export class UserProfile extends React.Component<{ translations: IAppContext }> { +export class UserProfile extends React.Component<{ translations: IAppContext, changeUsername: (val: string) => void }> { public state: IUserProfileState = { username: readRecord('username') || 'guest0001' };