Skip to content

Commit

Permalink
♻️ update tests to use vitest and react-testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
mihailgaberov committed Dec 31, 2023
1 parent 749819b commit f16799a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/UserProfile/UserProfile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { UserProfile } from './UserProfile';
import translationsMock from '../../translations/translations-mock';

const setup = () => {
return render(<UserProfile translations={translationsMock} changeUsername={() => {}}/>)
return render(<UserProfile translations={translationsMock} changeUsername={()=>''}/>)
};

describe('UserProfile component', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserProfile/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};
Expand Down

0 comments on commit f16799a

Please sign in to comment.