Skip to content

2.0.0-alpha-2

Compare
Choose a tag to compare
@lmiller1990 lmiller1990 released this 21 Apr 13:52

Features:

  • Support passing an array to stubs
  • Support mocks
  • Support props()
  • Support findComponent and findAllComponents to query for Vue components
    • findComponent(Foo)
    • findComponent({ ref: 'foo' })
    • findComponent({ name: 'foo' })
    • like in VTU beta
  • Support unmount method (destroy from VTU beta)
    • renamed to match Vue 3 API
  • Support setProps
  • Improve trigger to match VTU beta API
    • wrapper.trigger('keyup.enter', { keycode: 45 })
    • wrapper.trigger('click', { target: 'something' })
    • etc. Same as VTU beta.

Breaking Changes (from alpha-1)

  • stubs, mocks are now in a globals key:
mount(Foo, {
  globals: {
    stubs: {
      ...
    }
  }
}

You can read the full API in the docs