1 year ago

#336672

test-img

RONE

Uncaught TypeError: Cannot read properties of undefined (reading 'X') , Angalar8 Jasmine

I have an angular@8 application, were in when I run the tests in local everything works good. but when I raise the PR and the jenkins gets triggered running the command npm ru test I am gettign this error in jenkins. issue

But on couple of re-try the tests gets successful and the build gets success

I am not liking this approach, as I am not able to understand what is causing this issue (since there is no .toLowerCase() method in my applciation , have searched the whole project). Possibly it can be from external liraries/modules which are used in any one of the componet files, but Again I am not sure how to re-produce this in my local (as in my local, tests always gets sucessful). And in jenkins console log is not giving much information like from which spec the issue is coming from.

Can you guys please share your thoughts on what are the possible debugging steps ways I can do and detect the root cause of this issue.

Please let me know If you need some more information.

angular

unit-testing

jenkins

jasmine

karma-runner

0 Answers

Your Answer

Accepted video resources