Skip to content

Commit

Permalink
test: spy on console.warn
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 26, 2020
1 parent a4ec3e2 commit f2024d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit/specs/error-handling.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('error handling', () => {
})

it('async component errors', done => {
spyOn(console, 'warn')
const err = new Error('foo')
const spy1 = jasmine.createSpy('error')
const spy2 = jasmine.createSpy('errpr')
Expand All @@ -59,6 +60,7 @@ describe('error handling', () => {
expect(spy1).toHaveBeenCalledWith(err)
expect(spy2).toHaveBeenCalledWith(err)
expect(spy3).toHaveBeenCalled()
expect(console.warn).toHaveBeenCalledTimes(1)
done()
})
})
Expand Down

0 comments on commit f2024d5

Please sign in to comment.