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

propsData.spec.ts — vue Source File

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

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  9b23758b_606f_8494_38e6_d8d24c73f05f["propsData.spec.ts"]
  c5601857_7faf_30c6_efca_20de90db006c["vue"]
  9b23758b_606f_8494_38e6_d8d24c73f05f --> c5601857_7faf_30c6_efca_20de90db006c
  style 9b23758b_606f_8494_38e6_d8d24c73f05f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue from 'vue'

describe('Options propsData', () => {
  it('should work', done => {
    const A = Vue.extend({
      props: ['a'],
      template: '<div>{{ a }}</div>'
    })
    const vm = new A({
      propsData: {
        a: 123
      }
    }).$mount()
    expect(vm.a).toBe(123)
    expect(vm.$el.textContent).toBe('123')
    vm.a = 234
    waitForUpdate(() => {
      expect(vm.$el.textContent).toBe('234')
    }).then(done)
  })

  it('warn non instantiation usage', () => {
    Vue.extend({
      propsData: {
        a: 123
      }
    })
    expect(
      'option "propsData" can only be used during instance creation'
    ).toHaveBeenWarned()
  })
})

Dependencies

  • vue

Frequently Asked Questions

What does propsData.spec.ts do?
propsData.spec.ts is a source file in the vue codebase, written in typescript.
What does propsData.spec.ts depend on?
propsData.spec.ts imports 1 module(s): vue.
Where is propsData.spec.ts in the architecture?
propsData.spec.ts is located at test/unit/features/options/propsData.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