Hello,

I am developing Chrome App with AngularJS. As my app uses chrome.storage I 
wrote wrapper:

angular.module('app').factory('chromeStorageApi', function($window){
    if(typeof  $window.chrome.storage == 'undefined')
    return false;

    return{
        set:function(obj, callback){
            $window.chrome.storage.local.set(obj, callback)
            return true;
        },
       .............................
    }
}

I have violated TDD methodology and now I want to test my wrapper. But all 
my attempts  were not successful. I tried to check that 
 $window.chrome.storage.local.set() has the same arguments as 
chromeStorageApi.set() but I could not find a way how I can mock 
 $window.chrome.storage.local. I would be really grateful for help. 

Thank you very much.

Vitaly

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to