Releases: jackmellis/vuenit
Releases · jackmellis/vuenit
0.4.0
- Previously, if prop values were not passed into
options.props
, settingvm.propsData.unsetprop
would not update the component. This has now been fixed. - Improved
$store.when
to accept method types (i.e. commit/dispatch) as well as adding$store.otherwise
method. Also accepts regular expressions to match against: e.g.$store.when('commit', /MYCOMMIT/).return('value')
. vuenit.router()
creates a mock version of$route
and$router
.- Can automatically inject $route and $router into a component with the router option:
{ router : true }
stubDirectives
option lets you automatically stub all directives used by a component- If a component instance already has properties for
$name
,$html
,$find
, etc., they will not be overwritten with vuenit's properties. shallow
option can be passed in, which is an alias for setting stubComponents, stubFilters, and stubDirectives to true.- Components can also be shallow rendered by calling the new
vuenit.shallow()
method. - The
before
option allows you to intercept the component and options just before the component is instantiated, allowing you to spy on component methods or mock computed values, etc.
0.3.1
- Fixed issues with
stubComponents
option getting transposed by Vue for global components. stubComponents
default template now has a<slot>
so it still renders inner html.
0.3.0
- Access component instance's name with
vm.$name
(rather thanvm.$options.name
) - Access component's html content with
vm.$html
(rather thanvm.$el.outerHTML
) vm.$find
allows you to search a component's html for matching elements or component instances.vm.$contains
tests whether a component contains another component or a html element.slots
option lets you easily insert slot content into a component. This is the equivalent of manually inserting slots with theinnerHTML
property.on
option lets you add event listeners when creating a component.stubFilters
flag automatically stubs all known filters.filters
option allows you to stub/mock filtersvuenit.trigger
method allows you trigger dom events.vm.$create
method creates a new instance of a component using the same options as before
0.2.0
- stubComponents flag automatically stubs all known components
- components options allows you to stub/mock components
- added install method
- disabled unknownElement debug message
- disabled productionTip debug message
- added a cleanUp method that removes any globally-registered components from the Base Vue object
vuenit.component.config
andvuenit.directive.config
allow global settings to be applied.
0.1.0
Added badges to readme