上QQ阅读APP看书,第一时间看更新
NetworkError
Network errors can be caused by a multitude of underlying issues:
NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'ng:///DynamicTestModule/AppComponent.ngfactory.js'.
Working inside out, you should implement test doubles of services and provide the fakes to the appropriate components, as covered in the previous section. However, in parent components, you may still encounter errors even if you correctly provided fakes. Refer to the section on dealing with generic error events to uncover the underlying issues.