-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from glific/increase-test-coverage
Increase test coverage
- Loading branch information
Showing
5 changed files
with
58 additions
and
7 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
21 changes: 21 additions & 0 deletions
21
src/components/UI/Layout/Navigation/SideMenus/SideMenus.test.tsx
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import { mount } from 'enzyme'; | ||
import { wait } from '@testing-library/react'; | ||
import SideMenus from './SideMenus'; | ||
import { getCurrentUserQuery } from '../../../../../mocks/User'; | ||
|
||
const mocks = [getCurrentUserQuery]; | ||
describe('side menu testing', () => { | ||
const component = ( | ||
<MemoryRouter> | ||
<SideMenus opened={false} /> | ||
</MemoryRouter> | ||
); | ||
|
||
it('it should be initialized properly', async () => { | ||
const wrapper = mount(component); | ||
await wait(); | ||
expect(wrapper).toBeTruthy(); | ||
}); | ||
}); |
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