Unknown provider CookieStore
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having service where I want to use the $cookieStore module. It works fine, but when unit testing it breaks, and gives the error: "$cookieStoreProvider <- $cookieStore <- filtersService". The service looks like this: serviceModule.factory('filtersService', ['$rootScope', '$location', '$cookieStore', function($rootScope, $location, $cookieStore){ return { getFilters: function(){...} } And the unit test service looks like this: describe('filtersService tests', function(){ var filtersService; beforeEach(module('App.services')); beforeEach