-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix:failing tests * chore:fix-merge-conflicts
- Loading branch information
1 parent
0ef2ab3
commit f467d15
Showing
5 changed files
with
35 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
28 changes: 16 additions & 12 deletions
28
src/test/unit/components/new-member-card/NewMembersCard.test.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
import { render } from '@testing-library/react'; | ||
import { renderWithProviders } from '../../../../test__utils/renderWithProvides'; | ||
import React from 'react'; | ||
import NewMembersCard from './../../../../../src/components/NewMember/index'; | ||
import NewMembersCard from '../../../../components/NewMemberSection/NewMemberCard/index'; | ||
import { userData } from '../../../../mocks/db/user'; | ||
|
||
jest.mock('next/router', () => ({ | ||
useRouter() { | ||
return { | ||
route: '/', | ||
pathname: '', | ||
query: '', | ||
asPath: '', | ||
}; | ||
}, | ||
})); | ||
|
||
describe('NewMembersCard', () => { | ||
it('renders the component', () => { | ||
const newMemberFirstName = 'Sunny'; | ||
const newMemberLastName = 'Kumar'; | ||
const newMemberImageSrc = '/../../../public/images/Avatar.png'; | ||
const user = userData; | ||
|
||
const { container } = render( | ||
<NewMembersCard | ||
newMemberFirstName={newMemberFirstName} | ||
newMemberLastName={newMemberLastName} | ||
newMemberImageSrc={newMemberImageSrc} | ||
/>, | ||
); | ||
const { container } = renderWithProviders(<NewMembersCard user={user} />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains 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