Home / File/ error.spec.ts — vue Source File

error.spec.ts — vue Source File

Architecture documentation for error.spec.ts, a typescript file in the vue codebase. 2 imports, 0 dependents.

File typescript 2 imports

Entity Profile

Dependency Diagram

graph LR
  96bc9ea0_6d50_f1e6_690c_cc0672d2861f["error.spec.ts"]
  db9e7bef_009d_3918_6e7d_543a36a38d75["vue"]
  96bc9ea0_6d50_f1e6_690c_cc0672d2861f --> db9e7bef_009d_3918_6e7d_543a36a38d75
  ab108802_84bd_6dad_f0bd_4ccf149015ca["error"]
  96bc9ea0_6d50_f1e6_690c_cc0672d2861f --> ab108802_84bd_6dad_f0bd_4ccf149015ca
  style 96bc9ea0_6d50_f1e6_690c_cc0672d2861f 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

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