Closed adrianduke closed 10 years ago
Thanks for reporting the problem.
The root cause is that the test should really be waiting for angularAMD's bootstrap to take place, which happens after the document.ready
event. I updated the angularAMD-karma project to use Jasmine 2.0 and added needed wait.
@marcoslin I just tried upgrading to Jasmine 2 from Jasmine 1.5 and it broke all my tests. Couldn't get it working, threw same error as original poster. When I added 'angularAMD': ['angular']
into shims, it kept timing out. Couldn't get it working and had to revert to Jasmine 1.5 again.
What did you change in angularAMD-karma to make it work with Jasmine 2.0, was it specifically the interval method in the app_test.js file?
@mpiasta-ca yes, the key was the interval method in the app_test.js. I just pushed a new version adding directive testing as per #111.
Hi,
I'm trying to use angularAMD inside my angular project but keep butting up against issues in regards to injecting and unit tests. It appears to be related to jasmine 2.0, so I went ahead and pulled the
marcoslin/angularAMD-karma
repo and upgraded:karma-jasmine
to~0.2.0
angular
to1.2.26
requirejs
to2.1.15
When I ran the tests I got the following:
These errors are different to what I am experiencing with my code base, but I will put them in a separate issue.
Thanks, Adrian