ng-annotate-trim-underscores ng-annotate plugin that makes it ignore leading and trailing underscores, like angular.mock.inject function (_$http_, $q, _) { // ... } is annotated as ['$http', '$q', '_', function (_$http_, $q, _) { // ... }] Run tests npm install npm test