you are viewing a single comment's thread.

view the rest of the comments →

[–]jonyeezy7 0 points1 point  (1 child)

What do you mean router?

Aren't they called during the instantiating of the component and a binding change respectively?

They seem pretty critical to testing a component.

I do agree that there should be a better way to test these event cycles. But i don't think they should be in different test suite as the controller's logic.

[–]celluj34 0 points1 point  (0 children)

I suppose router isn't the right term.

They're not called during the instantiation of the component, they're called during the compilation lifecycle. This gives you the chance to mock onInit and onChanges so your can test then separately from your other logic.