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

name.spec.ts — vue Source File

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

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  8c916eb5_169f_cb4c_aa35_24687e988bca["name.spec.ts"]
  db9e7bef_009d_3918_6e7d_543a36a38d75["vue"]
  8c916eb5_169f_cb4c_aa35_24687e988bca --> db9e7bef_009d_3918_6e7d_543a36a38d75
  style 8c916eb5_169f_cb4c_aa35_24687e988bca 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

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