0

I have a presentational form component which gets it's form from the service. Handling value changes, adding new controls, removing controls, etc happens in the service. I already wrote many test cases for the service but my company demands to have at least 80% code coverage so I need to test almost everything lol.

Component's class has only few methods which are used to call service's methods. And I can't test DOM either because whenever some action happens that changes something in Form Group, It's being handled by the service.

  • You can make sure that the methods in the component are called by events in the template when they should be, and that a form emitted by the service is displayed correctly. You can make sure that anything received from the service (by mocking the service) causes the right effect in the component. Plenty of stuff to test. – Will Alexander Feb 15 '22 at 16:03
  • @WillAlexander Thanks I will do that. – vazha abdushelishvili Feb 15 '22 at 16:08

0 Answers0