Home / Class/ Test Class — vue Architecture

Test Class — vue Architecture

Architecture documentation for the Test class in vue-test.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  d22bce74_0b1e_4cc4_b52b_fe47e1198100["Test"]
  577b18a3_afe0_046c_7877_883e64088830["vue-test.ts"]
  d22bce74_0b1e_4cc4_b52b_fe47e1198100 -->|defined in| 577b18a3_afe0_046c_7877_883e64088830
  033e6161_0c01_5a13_4ade_7c69415274af["testProperties()"]
  d22bce74_0b1e_4cc4_b52b_fe47e1198100 -->|method| 033e6161_0c01_5a13_4ade_7c69415274af
  4792acb6_732f_23ae_bc4a_7dd09cba8060["testReification()"]
  d22bce74_0b1e_4cc4_b52b_fe47e1198100 -->|method| 4792acb6_732f_23ae_bc4a_7dd09cba8060
  f6185d40_c542_41d4_4964_1ab5b34b4ce8["testMethods()"]
  d22bce74_0b1e_4cc4_b52b_fe47e1198100 -->|method| f6185d40_c542_41d4_4964_1ab5b34b4ce8
  85c88fdc_1675_33b9_378a_68c097aa0377["testConfig()"]
  d22bce74_0b1e_4cc4_b52b_fe47e1198100 -->|method| 85c88fdc_1675_33b9_378a_68c097aa0377

Relationship Graph

Source Code

types/test/vue-test.ts lines 4–123

class Test extends Vue {
  a: number = 0

  testProperties() {
    this.$data
    this.$el
    this.$options
    this.$parent
    this.$root
    this.$children
    this.$refs
    this.$slots
    this.$isServer
    this.$ssrContext
    this.$vnode
    this.$root.$children[0].$children[0]
  }

  // test property reification
  $el!: HTMLElement | SVGElement
  $refs!: {
    vue: Vue
    element: HTMLInputElement
    vues: Vue[]
    elements: HTMLInputElement[]
  }
  testReification() {
    this.$refs.vue.$data
    this.$refs.element.value
    this.$refs.vues[0].$data
    this.$refs.elements[0].value
  }

  testMethods() {
    this.$mount('#app', false)
    this.$forceUpdate()
    this.$destroy()
    this.$set({}, 'key', 'value')
    this.$delete({}, 'key')
    this.$watch('a', (val: number, oldVal: number) => {}, {
      immediate: true,
      deep: false
    })()
    this.$watch(
      () => this.a,
      (val: number) => {}
    )
    this.$on('', () => {})
    this.$once('', () => {})
    this.$off('', () => {})
    this.$emit('', 1, 2, 3)
    this.$nextTick(function () {
      this.$nextTick
    })
    this.$nextTick().then(() => {})
    this.$createElement('div', {}, 'message')
  }

  static testConfig() {
    const { config } = this
    config.silent
    config.optionMergeStrategies
    config.devtools
    config.errorHandler = (err, vm) => {
      if (vm instanceof Test) {
        vm.testProperties()
        vm.testMethods()
      }
    }
    config.warnHandler = (msg, vm) => {
      if (vm instanceof Test) {
        vm.testProperties()
        vm.testMethods()
      }
    }
    config.keyCodes = { esc: 27 }
    config.ignoredElements = ['foo', /^ion-/]
    config.async = false
  }

  static testMethods() {

Domain

Frequently Asked Questions

What is the Test class?
Test is a class in the vue codebase, defined in types/test/vue-test.ts.
Where is Test defined?
Test is defined in types/test/vue-test.ts at line 4.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free