mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-05 05:27:59 +08:00
fix errorHandler tests
This commit is contained in:
parent
068f6270d5
commit
bb5c102c35
@ -35,6 +35,8 @@ describe('Global config', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('errorHandler', () => {
|
describe('errorHandler', () => {
|
||||||
|
it('should be called with correct args', () => {
|
||||||
|
const spy = jasmine.createSpy('errorHandler')
|
||||||
Vue.config.errorHandler = spy
|
Vue.config.errorHandler = spy
|
||||||
const err = new Error()
|
const err = new Error()
|
||||||
const vm = new Vue({
|
const vm = new Vue({
|
||||||
@ -43,4 +45,5 @@ describe('Global config', () => {
|
|||||||
expect(spy).toHaveBeenCalledWith(err, vm)
|
expect(spy).toHaveBeenCalledWith(err, vm)
|
||||||
Vue.config.errorHandler = null
|
Vue.config.errorHandler = null
|
||||||
})
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user