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

inheritAttrs.spec.ts — vue Source File

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

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  0da72640_2bd4_4a24_664a_422f43755f35["inheritAttrs.spec.ts"]
  db9e7bef_009d_3918_6e7d_543a36a38d75["vue"]
  0da72640_2bd4_4a24_664a_422f43755f35 --> db9e7bef_009d_3918_6e7d_543a36a38d75
  style 0da72640_2bd4_4a24_664a_422f43755f35 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue from 'vue'

describe('Options inheritAttrs', () => {
  it('should work', done => {
    const vm = new Vue({
      template: `<foo :id="foo"/>`,
      data: { foo: 'foo' },
      components: {
        foo: {
          inheritAttrs: false,
          template: `<div>foo</div>`
        }
      }
    }).$mount()
    expect(vm.$el.id).toBe('')
    vm.foo = 'bar'
    waitForUpdate(() => {
      expect(vm.$el.id).toBe('')
    }).then(done)
  })

  it('with inner v-bind', done => {
    const vm = new Vue({
      template: `<foo :id="foo"/>`,
      data: { foo: 'foo' },
      components: {
        foo: {
          inheritAttrs: false,
          template: `<div><div v-bind="$attrs"></div></div>`
        }
      }
    }).$mount()
    expect(vm.$el.children[0].id).toBe('foo')
    vm.foo = 'bar'
    waitForUpdate(() => {
      expect(vm.$el.children[0].id).toBe('bar')
    }).then(done)
  })
})

Dependencies

  • vue

Frequently Asked Questions

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