ScaffAngular (angular-iunit)
An IntelliJ Unit Test Manager Plugin for Angular JS Modules
What is it about?
This plugin aims at following three core issues:
- Standardizing the naming convention of angular components across the application
- Bootstrapping and managing the test files right from the component's source file
- Bootstrapping documentation for the components and their respective test scenarios
How it works?
The plugin presents a very simple wizard to create angular modules. The wizard asks for only 3 key pieces of information:
- Component's type, e.g. service or a controller
- Components's name, e.g. Main for MainCtrl or panel for panelDirective
- Module's name, e.g. app.home for angular.module("app.home")
With this information available, the plugin
- creates the source and the test files with the appropriate suffix. e.g. MainCtrl.js and MainCtrlSpec.js
- Adds the ngdocs based documentation to the component's source file, e.g. MainCtrl.js.
- Bootstraps the controller with the basic template
- Adds jsdocs documentation to the test spec file, e.g. MainCtrlSpec.js
- Bootstraps the basic instantiation test! You don't need to write the instantiation tests anymore! Yay! (saves hell lot of time and great for basic test coverage)
- Navigate to test specs from source files, even for those not created using this plugin (Well, conditions apply).
For Example, to create an angular controller with the name SillyCtrl.js, under the module name app.insane:This will bootstrap the required component.
- Select component type as controller
- Enter "Silly" in file name - without quotes of course
- Enter "app.insane" in module name - without quotes of course
How to install
- Clone the repository or download as a zip archive and unzip it.
- There is an "angular-iunit.jar" file in the contents of the repository.
- Go to any Jetbrains IDE like PyCharm or IntelliJ Idea and install the plugin from disk.
- Select the "angular-iunit.jar" file during the install.
Thats it
Feel free to fork!
Log in or sign up for Devpost to join the conversation.