Skip to content

Releases: jackmellis/vuenit

1.2.0

16 Apr 15:37
Compare
Choose a tag to compare
  • Fixed peer dependency
  • Added prototype option allowing you to add stuff to the Vue prototype
  • Upgraded slots to use slot-scope syntax

1.1.2

28 Mar 12:02
Compare
Choose a tag to compare
  • 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

28 Sep 18:35
Compare
Choose a tag to compare
  • Polyfill Object.assign

1.1.0

20 Sep 20:06
Compare
Choose a tag to compare
  • 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 with vm.$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

12 Jul 14:55
Compare
Choose a tag to compare
  • vm.$find now returns an array-like object that exposes the first matched item's object. So you can now do vm.$find('router-link').$html as well as vm.$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 with vm.$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 above vuenit.build method. 67
  • When calling vm.$find to return html elements (i.e. vm.$find('button') or vm.$findOne('.thingy')) the element will be augmented with $html, $name, $find, $contains etc. 71
  • Added vm.$text and foundElement.$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

12 Jul 14:40
Compare
Choose a tag to compare
v0.6.1

0.6.0

25 Jun 22:18
Compare
Choose a tag to compare
  • Added a Vue and injector option 58
  • Added a data option to specify initial data properties 55
  • Made component.name or options.name optional, it will just default to a randomly-generated test name 62
  • Added vm.$trigger method 64

0.5.0

12 Jun 14:50
Compare
Choose a tag to compare
  • vuenit.http now uses the mock-http-client library.
  • vuenit.store now uses the mock-vuex library.
  • vuenit.router now uses the mock-vue-router library.
  • Added a directives option so you can stub specific directives.

0.4.2

29 May 07:38
Compare
Choose a tag to compare
  • 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 write vuenit.component.config.property=value.

0.4.1

27 May 01:47
Compare
Choose a tag to compare
  • Fixed a bug when using vue/dist/vue.esm.js (Vue's main entry point) as Vuenit doesn't expect esm syntax.