before

before : function(component, options){}

The before function is called just before instantiating the component. The component has been processed by this point, with stubbed components and templates converted into render functions.

The component's properties are all cloned from the original. This means you can overwrite the component's properties without it affecting the original configuration object.

mount(c, {
  before(component){
    component.methods.onClick = spy;
  }
});

results matching ""

    No results matching ""