So this is really stupid. But this is not possible for Google, because the undefined module is literally module. I got rid of all other TS errors in my unit tests, except for this last one:
main / components / login / loginController.Spec.ts (12,7): error TS2304: cannot find the name 'module'.
Some said, “Just enable angular -mocks.js,” but I did it and it fixed some other errors, but not this one.
Here are my links:
And here is a simple test illustrating the problem.
describe('Login Controller Spec', function() {
beforeEach(function() {
module('App');
inject(function(_$controller_, $rootScope) {
scope = $rootScope.$new();
controller = _$controller_;
navCtrl = controller('loginController', { $scope: scope});
});
});
it('should call init', function(){
});
});
Any other libraries for which I should get definitions?
source
share