abu helps you setup Tetra.js projects and its Jasmine test specs.
But remember - you should write your tests before you write your code!
npm install -g abu
npm update -g abu (or
npm update -g to update all global libraries)
abu will expect a Maven-configured project, with Tetra.js resources residing in the following folders
You can override these defaults by creating a file named
abu.json in the project root. Consult the file
to see how this file should be formatted.
abu can build empty model, view and controller skeletons for new projects, along with test skeletons and empty fixtures.
abu make myApp, where myApp is the name of the application you want to create
abu will create
--model [model]Make only this named model
--controller [controller]Make only this named controller
--view [view]Make only this named view
--scope [scope]Name of the scope to use (defaults to the name of the application)
--overwriteOverwrite any existing source files or test specs
abu can generate partially completed Jasmine test specs for an existing project.
abu test myApp, where myApp is the name of the application you want to test
abu will run a check on the code, and then create
--controller [controller]Make specs only for this named controller
--view [view]Make specs only for this named view
--overwriteOverwrite any existing test specs
abu can run some basic validations on existing Tetra.js code.
abu validate myApp, where myApp is the name of the application you want to check
abu finds a
jshint.json configuration file in the root directory, then JSHINT errors will be included in the output.
Consult the file
jshint.sample.json for an example.
abu finds an
abu.json configuration file with the options
will also output complexity statistics for files and functions with a cyclomatic complexity greater than the
value, or files with a Halstead maintainability index less than the
--model [model]Only validate this named model
--controller [controller]Only validate this named controller
--view [view]Only validate this named view
Here's a few example commands and the files they create. Remember -
abu make will create empty test and MVC skeletons for
a new project.
abu test will create partially-completed test skeletons generated from an existing project.
With scope set to the value 'baz'
Nothing will be created as, in this case, all the test spec files already exist
--controller [controller] or
--view [view], to limit the validation to a single file.
abu is the kleptomaniac monkey from Disney's Aladdin. Say
abu hello and he'll say hi.