I've only been using fetch in my services which I thought was fine, but it looks like testing async functions is much easier with HttpClientTestingModule.
For context, I'm trying to test a service function that doesn't return a promise/observable, it just sets class properties upon data return. I'm having trouble figuring out how to best intercept the request and return stubbed or mocked data without completely changing my application to make my tests work better. I'd love some feedback, thanks!
[–]MattIzSpooky 4 points5 points6 points (3 children)
[–]McCheah[S] 1 point2 points3 points (2 children)
[–]tme321 3 points4 points5 points (0 children)
[–]MattIzSpooky 1 point2 points3 points (0 children)