bcaudan/jasmine-spec-reporter

Consider using string rather than String().

johnjbarton opened this issue · 1 comments

In working on a PR #130 I hit mysterious problems on a couple of occasions that I eventually traced back to String vs string.

Which of these one uses almost never matters. Except when it does, then 'string' will win.

http://stackoverflow.com/questions/14727044/typescript-difference-between-string-and-string

For example, one of the issues I hit was from a type test in colors:
https://github.com/Marak/colors.js/blob/master/lib/extendStringPrototype.js#L79
When I send a String, the code throws. I suppose the issue is in combination with some other setting special to testing, but there isn't really any advantage to String.

Thanks for raising this point.

IIRC, I had some type issues due to String prototype extension by color.js. Eventually, I kept String.
I will have a deeper look into it.