我得到了一个使用工厂来创建某个对象的类。在我的单元测试中,我想访问工厂的返回值。因为工厂是直接传递给类的,并且没有为创建的对象提供getter,所以我需要拦截从工厂返回对象。spy(factory);
// At this point I would like to get是否有可能访问工厂的返回值?可能是在利
'myService', function ($http) { var getData = function(link) { //function to getsome data from a get request to 'link' .success(function(responsemyService;我使用了两个控制器,一个向myServi