Releases: vuejs/test-utils
Releases · vuejs/test-utils
2.0.0-alpha.3
Features
attachTo
: see docs. thanks to our boy @pikax- add a browser build. Thanks to me!
getComponent
. Likeget
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
- fix: emit should propagate the event @cexbrayat
General Improvements
- improve
stubs
,findComponent
, improved test coverage @dobromir-hristov! - better type definitions and type tests with
tds
@cexbrayat
2.0.0-alpha-2
Features:
- Support passing an array to
stubs
- Support
mocks
- Support
props()
- Support
findComponent
andfindAllComponents
to query for Vue componentsfindComponent(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 APIwrapper.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
First public alpha. Includes basic features as listed in the README at the time of release.