It seems like every time I write tests for Angular, they fail at runtime instead of build time. Issues like 'No Provider found', 'Null', and 'etc NULL' keep popping up, and I end up constantly searching on Google for solutions. This is why React has gained the top market share now. Is there a way to catch all these issues at build compile time instead of dealing with them at runtime?
After googling to fix one issue, I now have 10 more. Is there a more efficient solution to resolving these without getting stuck in a loop?
NullInjectorError: R3InjectorError(DynamicTestModule)[InjectionToken MatDialogData -> InjectionToken MatDialogData]:
NullInjectorError: No provider for InjectionToken MatDialogData!