Skip to content

Commit

Permalink
Silence error logging in ajax spec
Browse files Browse the repository at this point in the history
Jest logs the error that is thrown purposely in this spec.
  • Loading branch information
tvdeyen committed Nov 24, 2023
1 parent 370aa8a commit d974b3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/javascript/alchemy_admin/utils/ajax.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ describe("get", () => {
})

it("network errors get rejected", async () => {
global.console = {
...console,
error: jest.fn()
}
xhrMock.get("http://localhost/users", () => {
return Promise.reject(new Error())
})
Expand Down

0 comments on commit d974b3e

Please sign in to comment.