var testModule = angular.module('testModule', []); // config blocks testModule.config(function() { spy.config('config1'); }); testModule.config(function() { spy.config('config2'); }); // run blocks testModule.run(function() { spy.run('run1'); }); testModule.run(function() { spy.run('run2'); }); // controllers testModule.controller('TestCtrl', function($scope) { spy.ctrl('ctrl'); }); // services testModule.factory('testService', [function () { spy.service('service'); return {}; }]); // filters angular.module('testModule').filter('testFilter', function () { spy.filter('filter'); return function (input) { return input; } }); // directives testModule.directive("test", function () { spy.directive('directive'); return { restrict: 'E', replace: true, template: '