karma-runner / karma-runner/karma
karma stop when error object is not string (Firefox & IE)
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I started a test with Karma and received the error `TypeError: undefined is not a function`. I tried to debug it and found out that: in the function `createErrorFormatter` in the file `reporter.js` this line couldn't be executed:
`msg = (msg || '').replace(URL_REGEXP, function (_, prefix, path, __, ___, line, ____, column) {...`
The reason is the `msg` which was given in the method `onKarmaError` in the file `browser.js` is not a `String` and hence the `replace` function is `undefined`:
Surprisingly this issue occurs only when I test with Firefox and IE. There is no issue with Chrome and Safari.


Contributor guide
Research direction
Start in reporter.js at createErrorFormatter and trace the message passed from browser.js through onKarmaError. Reproduce the failure in Firefox or IE with a non-string error object, then verify that error formatting completes without the replace call failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100