-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Compat issue with jasmine 2.0.0 regarding currentSpec.queue.running #5632
Comments
What I did in the meantime to get the tests to run is ...
And then ...
It's a hack so I'd love to hear some better options |
Some background for what the code does (if it's not obvious): the reason for this check is that If a spec is not running we need set up the spec so that when jasmine executes it, the injector will inject the nested spec fn. In this case inject is asynchronous:
however if you use inject from within a spec, the injection must be synchronous. This is commonly used if you need both the
|
this really is a jasmine issue, so I'm eagerly waiting for some reply to jasmine/jasmine#492 |
@IgorMinar Their response seems reasonable and something that you could modify angular mocks with. Would the simple hack I did work or their reporter option work? |
The related issue was closed with Jasmine, and I agree with them that it should be a change in Angular Mocks (after reading their reasoning). I've modified my angular mocks to use the modified code to make this work again and its going well. I request that this change be made to angular mocks too.
because the window.mocha || window.jasmine check seems to have been done on line 1917. An alternate option, perhaps for users that don't want to add their own beforeEach/afterEach for spec tracking, is to use the Jasmine reporter interface. Adopted for the angular-mock use case, that would look something like the following:
I'll make a pull request. |
Shouldn't this issue be closed? |
indeed, this was fixed in 95f0bf9 @IgorMinar |
…ar-mocks/jasmine per angular/angular.js#5632 comments; first karma test now passing
Angular Mocks checks if a spec is running by using
However in Jasmine 2.0.0 currentSpec.queue doesn;t exist nor does any "running" property. How do we determine if a spec is running so we can propose a pull request for NG mocks?
See ... jasmine/jasmine#492
The text was updated successfully, but these errors were encountered: