I'm trying to create a mocked service using BardJS but I have found the docs a bit lacking and I'm new to JS unit testing anyway so its probably something obvious I'm missing but anyway... I have the following setup:
beforeEach(function () {
bard.appModule('app.home');
bard.inject('$controller', '$rootScope', 'HomeService', 'BreadcrumbService');
homeService = bard.mockService(HomeService, {});
breadcrumbService = bard.mockService(BreadcrumbService, {});
homeController = $controller('HomeController');
$rootScope.$apply();
});
When I try to expect that a method on the BreadcrumbService has been called I get the following error:
Error: Expected a spy, but got Function.
Has anyone got any ideas?