While implementing Karma on an AngularJS application with version 1.3.16
, the angular-mocks
module throw the following error -
angular-mocks.js:Uncaught TypeError: angular.module(...).info is not a function
After googling, found that the version of Karma used i.e. 1.5.0
and the version of AngularJS are not compatible. The version of angular-mocks used is 1.6.3
.
So, after googling, found that there is no way to find out which version of AngularJS is compatible with which version of Karma or Angular-Mocks. Any help is appreciated.
Angular 14 – The Latest Version This TypeScript-based web application framework released on 2nd June 2022 is developed by Google and supports the latest TypeScript 4.7 release. As compared to its ancestral versions, Angular 14 is one of the most thoughtfully designed and holistic upgrades.
Finally, Angular 14, the latest version of the Google-developed, TypeScript-based web application framework, made its way on 2nd June 2022, with the prior success of Angular 13.
First, download the file: Google CDN e.g. "//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js" NPM e.g. npm install [email protected].
Angular is a blanket term that is used for all the versions which came after AngularJS (Angular 1), i.e., Angular 2, Angular 4, Angular 5 and now Angular 6. It has the latest and most refined framework till date to design a web application that is dynamic and responsive.
The relationship is direct. They should be matched. 1.3.16 version of angular.js
has to be matched with 1.3.16 versions of angular-*.js
modules (including angular-mocks.js
).
Obviously, if ngMock 1.6.3 uses a feature (info
method) that wasn't previously implemented in core library, it will throw an error.
ngMock reference states:
First, download the file: <...> where X.Y.Z is the AngularJS version you are running.
Angular versions aren't related to Karma versions at all. Karma is just a runner, it executes tests and isn't tied to frameworks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With