I have recently upgraded Angular app, and so updated Mathjax-angular version too just because new version is available for it. But since then when I run ng test, I am getting unit test errors like:
Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'then') TypeError: Cannot read properties of undefined (reading 'then') at MathjaxDirective.typeset
And the error description doesnt contain any spec file link or line number. This error is failing many spec files but not listing the file name.
FYI, all the spec files in the app contains these two lines in common:
- import {MathjaxModule} from 'mathjax-angular';
and in beforeEach() block imports array, 2. Mathjaxmodule.forRoot()
What could be causing this error? Please suggest a solution.