Fix length issue ViolationTray.test.js
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 <dhyer@instructure.com> QA-Review: Davis Hyer <dhyer@instructure.com> Product-Review: Davis Hyer <dhyer@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
91deed47bf
commit
aa71e6ffbc
|
@ -32,6 +32,7 @@ describe('Violation Tray', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('displays a spinner when loading data', async () => {
|
it('displays a spinner when loading data', async () => {
|
||||||
|
fetch.mockResponse(JSON.stringify([]))
|
||||||
const {findByText} = render(<ViolationTray {...getProps()} />)
|
const {findByText} = render(<ViolationTray {...getProps()} />)
|
||||||
// Even though there isn't an expect here... it's functionally the same,
|
// Even though there isn't an expect here... it's functionally the same,
|
||||||
// if it doesn't find it... the test will fail :)
|
// if it doesn't find it... the test will fail :)
|
||||||
|
|
Loading…
Reference in New Issue