Skip to content

Commit f2024d5

Browse files
committed
test: spy on console.warn
1 parent a4ec3e2 commit f2024d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: test/unit/specs/error-handling.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ describe('error handling', () => {
4141
})
4242

4343
it('async component errors', done => {
44+
spyOn(console, 'warn')
4445
const err = new Error('foo')
4546
const spy1 = jasmine.createSpy('error')
4647
const spy2 = jasmine.createSpy('errpr')
@@ -59,6 +60,7 @@ describe('error handling', () => {
5960
expect(spy1).toHaveBeenCalledWith(err)
6061
expect(spy2).toHaveBeenCalledWith(err)
6162
expect(spy3).toHaveBeenCalled()
63+
expect(console.warn).toHaveBeenCalledTimes(1)
6264
done()
6365
})
6466
})

0 commit comments

Comments
 (0)