My usual test case looks like
it("should send get request", inject(function(someServices) {
//some test
}));
And Jasmine 2.0 async test should look like
it("should send get request", function(done) {
someAsync.then(function(){
done();
});
});
How can I use both done and inject in one test?
This should work; I ran into the same problem when I updated to Jasmine 2.0
it("should send get request", function(done) {
inject(function(someServices) {
//some async test
done();
})(); // function returned by 'inject' has to be invoked
});