component.spec.ts — vue Source File
Architecture documentation for component.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 26665877_66bc_ec54_2c27_4c16a01aad40["component.spec.ts"] db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 26665877_66bc_ec54_2c27_4c16a01aad40 --> db9e7bef_009d_3918_6e7d_543a36a38d75 style 26665877_66bc_ec54_2c27_4c16a01aad40 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
describe('Component', () => {
it('static', () => {
const vm = new Vue({
template: '<test></test>',
components: {
test: {
data() {
return { a: 123 }
},
template: '<span>{{a}}</span>'
}
}
}).$mount()
expect(vm.$el.tagName).toBe('SPAN')
expect(vm.$el.innerHTML).toBe('123')
})
it('using component in restricted elements', () => {
const vm = new Vue({
template: '<div><table><tbody><test></test></tbody></table></div>',
components: {
test: {
data() {
return { a: 123 }
},
template: '<tr><td>{{a}}</td></tr>'
}
}
}).$mount()
expect(vm.$el.innerHTML).toBe(
'<table><tbody><tr><td>123</td></tr></tbody></table>'
)
})
it('"is" attribute', () => {
const vm = new Vue({
template: '<div><table><tbody><tr is="test"></tr></tbody></table></div>',
components: {
test: {
data() {
return { a: 123 }
},
template: '<tr><td>{{a}}</td></tr>'
}
}
}).$mount()
expect(vm.$el.innerHTML).toBe(
'<table><tbody><tr><td>123</td></tr></tbody></table>'
)
})
it('inline-template', () => {
const vm = new Vue({
template: '<div><test inline-template><span>{{a}}</span></test></div>',
data: {
a: 'parent'
},
components: {
// ... (400 more lines)
Dependencies
- vue
Source
Frequently Asked Questions
What does component.spec.ts do?
component.spec.ts is a source file in the vue codebase, written in typescript.
What does component.spec.ts depend on?
component.spec.ts imports 1 module(s): vue.
Where is component.spec.ts in the architecture?
component.spec.ts is located at test/unit/features/component/component.spec.ts (directory: test/unit/features/component).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free