-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Added test coverage for all CoursewareSearch components
- Loading branch information
Showing
4 changed files
with
201 additions
and
16 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
24 changes: 24 additions & 0 deletions
24
src/course-home/courseware-search/CoursewareSearchEmpty.test.jsx
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,24 @@ | ||
import React from 'react'; | ||
import { | ||
initializeMockApp, | ||
render, | ||
screen, | ||
} from '../../setupTest'; | ||
import CoursewareSearchEmpty from './CoursewareSearchEmpty'; | ||
|
||
function renderComponent() { | ||
const { container } = render(<CoursewareSearchEmpty />); | ||
return container; | ||
} | ||
|
||
describe('CoursewareSearchEmpty', () => { | ||
beforeAll(async () => { | ||
initializeMockApp(); | ||
}); | ||
|
||
it('should match the snapshot', () => { | ||
renderComponent(); | ||
|
||
expect(screen.getByTestId('search-results')).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