Releases: jackmellis/vuenit
Releases · jackmellis/vuenit
1.2.0
1.1.2
- Fixed hard dependencies (should be able to work with any version of Vue 2.x.x etc.)
- Improved
vm.$find
methods to avoid HTMLElement inheritence issues.
1.1.1
- Polyfill
Object.assign
1.1.0
- Slots option now supports scoped slots. The scope is passed in as
props
i.e.{ slots: { foo: '<span>{{props.bah}}</span>' } }
. 77 - The
on
option now actually passes events into the component render function, rather than just adding them to the instance withvm.$on
. This makes event testing more realistic (especially when dealing with render functions). 80 - It is now possible to test extended components (rather than just plain object components).
mount(Vue.extend(A).extend(B))
81
1.0.0
vm.$find
now returns an array-like object that exposes the first matched item's object. So you can now dovm.$find('router-link').$html
as well asvm.$find('router-link')[0].$html
. It still have array-like methods i.e.vm.$find('router-link').concat([])
and be turned into a true array withvm.$find('router-link').slice()
.65- Added
vuenit.build
method, allowing you to create a custom, reusable mount method. 68 - Removed
vm.$create
as this has been superseded by the abovevuenit.build
method. 67 - When calling
vm.$find
to return html elements (i.e.vm.$find('button')
orvm.$findOne('.thingy')
) the element will be augmented with$html
,$name
,$find
,$contains
etc. 71 - Added
vm.$text
andfoundElement.$text
properties that return the elements text content. - If a component template contained no dynamic rendering (just regular html elements with no mustaches, props, etc.) it would fail to render as vuenit was not attaching the static render functions. 73
vm.$find
,vm.$findOne
,vm.$contains
all now include the root element of a component as part of their search.
Breaking Changes
- As
vm.$find
no longer returns a true array, certain operations will no longer work, e.g.[].concat(vm.$find('...'), vm.$find('...'))
will not concat the results of 2 finds anymore as they are not arrays, you would need to call.slice()
on them first.Array.isArray
will also start returning false. - Any calls to
vm.$create
will throw a deprecation error. In future releases it will be removed entirely. - The find methods now include the root element as part of their search, so it possible this will break existing assertions.
0.6.1
v0.6.1
0.6.0
0.5.0
vuenit.http
now uses themock-http-client
library.vuenit.store
now uses themock-vuex
library.vuenit.router
now uses themock-vue-router
library.- Added a
directives
option so you can stub specific directives.
0.4.2
- Setting
vuenit.component.config.install
did not work as the install method was being activated before the options had been merged. - mock router was using
[].find
method which is not supported in older browsers. Replaced with old reliable for loops. vuenit.component.config
is now set by default, meaning you can just writevuenit.component.config.property=value
.
0.4.1
- Fixed a bug when using
vue/dist/vue.esm.js
(Vue's main entry point) as Vuenit doesn't expect esm syntax.