#Unit Testing Declarative Code
7 messages · Page 1 of 1 (latest)
First ask yourself "If I'm unit testing this file, what am I testing about it?" If you're testing it to generate the coverage, or to ensure the decorators are applied, you're testing it for the wrong reason
Obviously... so what DO I test about it? 90% of my app is declarative, there are just a couple lines of logic in my per-feature services... I don't think only testing those counts much for confidence in the overall application
Then you should probably try e2e testing over unit testing. Send in HTTP requests and assert their responses
Sense. Can jest(etc) generate a coverage map from e2e tests same as it can from unit?
With some configuration, yes, it's possible
Will play with it. Thanks much!