name.spec.ts — vue Source File
Architecture documentation for name.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 85fd7996_89aa_3b35_e547_60eb13735d97["name.spec.ts"] c5601857_7faf_30c6_efca_20de90db006c["vue"] 85fd7996_89aa_3b35_e547_60eb13735d97 --> c5601857_7faf_30c6_efca_20de90db006c style 85fd7996_89aa_3b35_e547_60eb13735d97 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
describe('Options name', () => {
it('should contain itself in self components', () => {
const vm = Vue.extend({
name: 'SuperVue'
})
expect(vm.options.components['SuperVue']).toEqual(vm)
})
it('should warn when incorrect name given', () => {
Vue.extend({
name: 'Hyper*Vue'
})
/* eslint-disable */
expect(`Invalid component name: "Hyper*Vue".`).toHaveBeenWarned()
/* eslint-enable */
Vue.extend({
name: '2Cool2BValid'
})
/* eslint-disable */
expect(`Invalid component name: "2Cool2BValid".`).toHaveBeenWarned()
/* eslint-enable */
})
it('id should not override given name when using Vue.component', () => {
const SuperComponent = Vue.component('super-component', {
name: 'SuperVue'
})!
expect(SuperComponent.options.components['SuperVue']).toEqual(
SuperComponent
)
expect(SuperComponent.options.components['super-component']).toEqual(
SuperComponent
)
})
it('should allow all potential custom element name for component name including non-alphanumeric characters', () => {
Vue.extend({
name: 'my-컴포넌트'
})
expect(`Invalid component name`).not.toHaveBeenWarned()
})
})
Dependencies
- vue
Source
Frequently Asked Questions
What does name.spec.ts do?
name.spec.ts is a source file in the vue codebase, written in typescript.
What does name.spec.ts depend on?
name.spec.ts imports 1 module(s): vue.
Where is name.spec.ts in the architecture?
name.spec.ts is located at test/unit/features/options/name.spec.ts (directory: test/unit/features/options).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free