0

This is a very weird issue after upgrading to Angular 6.

If I have 60 Test Cases exactly, Karma will fail with the error msg "[object ErrorEvent] thrown"

If it is 59, 61 or any other no. of Test Cases, there will be no issue.

Also, if I have like 61 Test Cases and I skip 1 Test (XIT), it will also fail upon running 60 Active Test Cases.

Update: I have tried running active tests in multiple of 10s (e.g. 30, 40, 50, 60, 70 Test Cases and skipping the Rest). All failed.

Anyone having the same issue here?

DanialChan
  • 100
  • 7
  • Re-run your test again with the following command: `ng test --source-map=false` and it will show the real error. Details [here](https://stackoverflow.com/questions/50761206/how-do-i-turn-off-source-maps-for-angular-6-ng-test) – dmcgrandle Nov 13 '18 at 18:57
  • @dmcgrandle We tried – DanialChan Nov 14 '18 at 01:49

1 Answers1

0

Have you tried running them in the browser, with debug?

Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.

PS : i am using Angular 6

dream88
  • 521
  • 2
  • 9
  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass `it('to pass', () => { expect(true).toBeTruthy(); });` – DanialChan Nov 14 '18 at 01:42
  • What versions are you using? Mine is like `"jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0"` & `"@types/jasmine": "^2.8.8",` – dream88 Nov 14 '18 at 12:53