mercredi 28 août 2019

How to debug [object ErrorEvent] thrown in angular/jasmine test cases

In my angular application, we are using jasmine and karma for running test cases. I have several components and it has their test cases written. When I added a new component and wrote test cases they ran successfully when I ran through fdescribe. When I run the whole test suit, I get [object ErrorEvent] thrown on some test case randomly. I don't see any issue with that test case. When I comment that test which it failed for [object ErrorEvent], it gave me the same error on another test case.

I tried to go to DEBUG on KARMA window and see the console, it didn't give me any clue. I tried running ng test --source-map=false, it didn't give me any clue.

  1. Are they any other options to find which test case is exactly causing the issue.
  2. While running ng test is there any option to know from which file the test cases are running, such that when failed I can go and look into the test cases in that file.

Aucun commentaire:

Enregistrer un commentaire