Skip to content

Commit

Permalink
Fix unhandled promise rejection errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vlki committed Jul 4, 2021
1 parent 6a27b07 commit 84931cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/fetchJSON.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('fetchJSON', () => {
})
global.fetch.mockReturnValueOnce(Promise.resolve({
clone: mockClone,
headers: new Headers()
headers: new Headers(),
ok: true
}))

const url = '/1'
Expand All @@ -43,7 +44,8 @@ describe('fetchJSON', () => {
})
global.fetch.mockReturnValueOnce(Promise.resolve({
clone: mockClone,
headers: new Headers()
headers: new Headers(),
ok: true
}))

const url = '/2'
Expand Down

0 comments on commit 84931cb

Please sign in to comment.