debug.spec.ts — vue Source File
Architecture documentation for debug.spec.ts, a typescript file in the vue codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 209a6cd7_8a9f_191d_452f_07ee4c41cdce["debug.spec.ts"] db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 209a6cd7_8a9f_191d_452f_07ee4c41cdce --> db9e7bef_009d_3918_6e7d_543a36a38d75 49aae190_0a6d_f5d1_c8de_aabde088509c["debug"] 209a6cd7_8a9f_191d_452f_07ee4c41cdce --> 49aae190_0a6d_f5d1_c8de_aabde088509c style 209a6cd7_8a9f_191d_452f_07ee4c41cdce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
import { formatComponentName, warn } from 'core/util/debug'
describe('Debug utilities', () => {
it('properly format component names', () => {
const vm = new Vue()
expect(formatComponentName(vm)).toBe('<Root>')
vm.$root = null
vm.$options.name = 'hello-there'
expect(formatComponentName(vm)).toBe('<HelloThere>')
vm.$options.name = null
vm.$options._componentTag = 'foo-bar-1'
expect(formatComponentName(vm)).toBe('<FooBar1>')
vm.$options._componentTag = null
vm.$options.__file = '/foo/bar/baz/SomeThing.vue'
expect(formatComponentName(vm)).toBe(`<SomeThing> at ${vm.$options.__file}`)
expect(formatComponentName(vm, false)).toBe('<SomeThing>')
vm.$options.__file = 'C:\\foo\\bar\\baz\\windows_file.vue'
expect(formatComponentName(vm)).toBe(
`<WindowsFile> at ${vm.$options.__file}`
)
expect(formatComponentName(vm, false)).toBe('<WindowsFile>')
})
it('generate correct component hierarchy trace', () => {
const one = {
name: 'one',
render: h => h(two)
}
const two = {
name: 'two',
render: h => h(three)
}
const three = {
name: 'three'
}
new Vue({
render: h => h(one)
}).$mount()
expect(
`Failed to mount component: template or render function not defined.
found in
---> <Three>
<Two>
<One>
<Root>`
).toHaveBeenWarned()
})
it('generate correct component hierarchy trace (recursive)', () => {
let i = 0
const one = {
name: 'one',
// ... (62 more lines)
Dependencies
- debug
- vue
Source
Frequently Asked Questions
What does debug.spec.ts do?
debug.spec.ts is a source file in the vue codebase, written in typescript.
What does debug.spec.ts depend on?
debug.spec.ts imports 2 module(s): debug, vue.
Where is debug.spec.ts in the architecture?
debug.spec.ts is located at test/unit/features/debug.spec.ts (directory: test/unit/features).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free