Browse Source

test for errorHandler config

dev
Evan You 9 years ago
parent
commit
068f6270d5
  1. 10
      test/unit/features/global-api/config.spec.js

10
test/unit/features/global-api/config.spec.js

@ -33,4 +33,14 @@ describe('Global config', () => {
Vue.config.silent = false
})
})
describe('errorHandler', () => {
Vue.config.errorHandler = spy
const err = new Error()
const vm = new Vue({
render () { throw err }
}).$mount()
expect(spy).toHaveBeenCalledWith(err, vm)
Vue.config.errorHandler = null
})
})

Loading…
Cancel
Save