Angular tests failing with Failed to execute 'send' on 'XMLHttpRequest'

后端 未结 11 1752
春和景丽
春和景丽 2020-12-12 12:11

I am trying to test my angular 4.1.0 component -

export class CellComponent implements OnInit {
  lines: Observable>;
  @Input() dep         


        
11条回答
  •  时光取名叫无心
    2020-12-12 12:51

    In my case the culprit was observable.timeout(x).retry(y) applied somewhere on the returned Observable on the service class level, then again in the component which was using that service.

    Everything worked correctly in the browser up until angular-cli 1.4. Then started failing during Karma tests (with such a silly error). The solution was of course to tidy up these timeout/retry operators.

提交回复
热议问题