mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-04 21:17:55 +08:00
fix errorHandler tests
This commit is contained in:
parent
068f6270d5
commit
bb5c102c35
@ -35,12 +35,15 @@ describe('Global config', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('errorHandler', () => {
|
describe('errorHandler', () => {
|
||||||
Vue.config.errorHandler = spy
|
it('should be called with correct args', () => {
|
||||||
const err = new Error()
|
const spy = jasmine.createSpy('errorHandler')
|
||||||
const vm = new Vue({
|
Vue.config.errorHandler = spy
|
||||||
render () { throw err }
|
const err = new Error()
|
||||||
}).$mount()
|
const vm = new Vue({
|
||||||
expect(spy).toHaveBeenCalledWith(err, vm)
|
render () { throw err }
|
||||||
Vue.config.errorHandler = null
|
}).$mount()
|
||||||
|
expect(spy).toHaveBeenCalledWith(err, vm)
|
||||||
|
Vue.config.errorHandler = null
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user