Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 341 Bytes

props.md

File metadata and controls

21 lines (15 loc) · 341 Bytes

props()

Return Wrapper vm props object.

Note the Wrapper must contain a Vue instance.

  • Returns: {[prop: string]: any}

  • Example:

import { mount } from '@vue/test-utils'
import Foo from './Foo.vue'

const wrapper = mount(Foo, {
  propsData: {
    bar: 'baz'
  }
})
expect(wrapper.props().bar).toBe('baz')