Home / File/ component-scoped-slot.spec.ts — vue Source File

component-scoped-slot.spec.ts — vue Source File

Architecture documentation for component-scoped-slot.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  c03ab596_9d68_b58f_2867_eb589008b0a5["component-scoped-slot.spec.ts"]
  db9e7bef_009d_3918_6e7d_543a36a38d75["vue"]
  c03ab596_9d68_b58f_2867_eb589008b0a5 --> db9e7bef_009d_3918_6e7d_543a36a38d75
  style c03ab596_9d68_b58f_2867_eb589008b0a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue from 'vue'

describe('Component scoped slot', () => {
  it('default slot', done => {
    const vm = new Vue({
      template: `
        <test ref="test">
          <template slot-scope="props">
            <span>{{ props.msg }}</span>
          </template>
        </test>
      `,
      components: {
        test: {
          data() {
            return { msg: 'hello' }
          },
          template: `
            <div>
              <slot :msg="msg"></slot>
            </div>
          `
        }
      }
    }).$mount()

    expect(vm.$el.innerHTML).toBe('<span>hello</span>')
    vm.$refs.test.msg = 'world'
    waitForUpdate(() => {
      expect(vm.$el.innerHTML).toBe('<span>world</span>')
    }).then(done)
  })

  it('default slot (plain element)', done => {
    const vm = new Vue({
      template: `
        <test ref="test">
          <span slot-scope="props">{{ props.msg }}</span>
        </test>
      `,
      components: {
        test: {
          data() {
            return { msg: 'hello' }
          },
          template: `
            <div>
              <slot :msg="msg"></slot>
            </div>
          `
        }
      }
    }).$mount()

    expect(vm.$el.innerHTML).toBe('<span>hello</span>')
    vm.$refs.test.msg = 'world'
    waitForUpdate(() => {
      expect(vm.$el.innerHTML).toBe('<span>world</span>')
    }).then(done)
  })
// ... (1347 more lines)

Dependencies

  • vue

Frequently Asked Questions

What does component-scoped-slot.spec.ts do?
component-scoped-slot.spec.ts is a source file in the vue codebase, written in typescript.
What does component-scoped-slot.spec.ts depend on?
component-scoped-slot.spec.ts imports 1 module(s): vue.
Where is component-scoped-slot.spec.ts in the architecture?
component-scoped-slot.spec.ts is located at test/unit/features/component/component-scoped-slot.spec.ts (directory: test/unit/features/component).

Analyze Your Own Codebase

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

Try Supermodel Free