I have upgraded Angular app recently along with Material, but somehow it resulted in more and more test fails.
So, I would like to understand, whether it is a mandatory step to update the versions of jasmine & karma related package dependencies in package.json ? Because as per the version compatibility, we do update the versions of tslib, rxjs, typescript & nodejs etc in the package.json. So does it apply same to Jasmine & Karma?
If yes, how to do that? Will it solve the test case fails issue occurred after angular v15 upgrade? All these tests were passing earlier.
Please provide a solution.
There has been some testing logic upgrades in
15, You can find the comprehensive steps on V15 belowAngular Upgrade Guide V14 -> V15
Have you done the below steps?
Also check if the correct versions are set for
karmaandjasminebelow is a stackblitz of a new project using angular 15, the versions should match, if you have a different version of angular 15, then first donpm i -g @angular/cli@<<version>>then dong new test, then check the versions ofkarmaandjasmineand verify all versions are the same!Stackblitz Demo