Skip to content

1.0.0

Compare
Choose a tag to compare
@jackmellis jackmellis released this 12 Jul 14:55
· 12 commits to master since this release
  • 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.