error.spec.ts — vue Source File
Architecture documentation for error.spec.ts, a typescript file in the vue codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR b9de973c_2461_4622_2fa9_d4085caa179a["error.spec.ts"] c5601857_7faf_30c6_efca_20de90db006c["vue"] b9de973c_2461_4622_2fa9_d4085caa179a --> c5601857_7faf_30c6_efca_20de90db006c ee5eb9b7_199d_10cb_20e9_bc526fcd975b["error"] b9de973c_2461_4622_2fa9_d4085caa179a --> ee5eb9b7_199d_10cb_20e9_bc526fcd975b style b9de973c_2461_4622_2fa9_d4085caa179a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
import { invokeWithErrorHandling } from 'core/util/error'
describe('invokeWithErrorHandling', () => {
if (typeof Promise !== 'undefined') {
it('should errorHandler call once when nested calls return rejected promise', done => {
const originalHandler = Vue.config.errorHandler
const handler = (Vue.config.errorHandler = vi.fn())
const userCatch = vi.fn()
const err = new Error('fake error')
invokeWithErrorHandling(() => {
return invokeWithErrorHandling(() => {
return Promise.reject(err)
})
})
.catch(userCatch)
.then(() => {
Vue.config.errorHandler = originalHandler
expect(handler.mock.calls.length).toBe(1)
expect(userCatch).toHaveBeenCalledWith(err)
done()
})
})
}
})
Dependencies
- error
- vue
Source
Frequently Asked Questions
What does error.spec.ts do?
error.spec.ts is a source file in the vue codebase, written in typescript.
What does error.spec.ts depend on?
error.spec.ts imports 2 module(s): error, vue.
Where is error.spec.ts in the architecture?
error.spec.ts is located at test/unit/modules/util/error.spec.ts (directory: test/unit/modules/util).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free