Skip to content

Releases: vuejs/test-utils

2.0.0-alpha.3

27 Apr 11:09
Compare
Choose a tag to compare

Features

  • attachTo: see docs. thanks to our boy @pikax
  • add a browser build. Thanks to me!
  • getComponent. Like get but for component instances. Throws an error if no instance is found. Note: Has a bug where doesn't work with children of <Suspense> by @cexbrayat!
  • plugin feature! you can add your own methods easily. Docs are a WIP, see them here. It's really cool. by @JessicaSachs!

Bugfixes

General Improvements

2.0.0-alpha-2

21 Apr 13:52
Compare
Choose a tag to compare

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

2.0.0-alpha-1

13 Apr 05:39
a6a50c7
Compare
Choose a tag to compare

First public alpha. Includes basic features as listed in the README at the time of release.