FOR BABEL 7.X INSTALL V2.X - FOR OLDER V1.X
babel-plugin-transform-ng-autoinject
When writing tests for AngularJS 1.x ease the pain of writing enormous boilerplate like this:
let $rootScope $httpBackend;
With the following syntax:
let $rootScope $httpBackend;
The plugin simply transforms the __autoinject
expression into the former inject(...)
The exact form the plugin outputs the autoinject expression is:
let $rootScope $httpBackend;
Installation
npm install --save-dev babel-plugin-transform-ng-autoinject
.babelrc