Skip to content

Commit

Permalink
Fix length issue ViolationTray.test.js
Browse files Browse the repository at this point in the history
test plan:
  - Run `yarn jest
./ui/features/account_settings/react/components/__tests__/ViolationTray.test.js`
  - Notice a clean test log.
  - Remove the mockResponse.
  - Run it again and notice length error.

qa risk: low

Change-Id: I30bb20bf870efb6ed19dbc7ee01ce8edf8ac79c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273974
Reviewed-by: Davis Hyer <[email protected]>
QA-Review: Davis Hyer <[email protected]>
Product-Review: Davis Hyer <[email protected]>
Tested-by: Service Cloud Jenkins <[email protected]>
  • Loading branch information
omarpr committed Sep 21, 2021
1 parent 91deed4 commit aa71e6f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('Violation Tray', () => {
})

it('displays a spinner when loading data', async () => {
fetch.mockResponse(JSON.stringify([]))
const {findByText} = render(<ViolationTray {...getProps()} />)
// Even though there isn't an expect here... it's functionally the same,
// if it doesn't find it... the test will fail :)
Expand Down

0 comments on commit aa71e6f

Please sign in to comment.