0.0.10 • Published 6 years ago

angularjs-test-generator v0.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

AngularJS Jasmine test generator

This is a simple CLI application to facilitate the creation of Jasmine test for AngularJS

npm version Known Vulnerabilities

Instalation

Via git:

git clone git+https://github.com/LuisEGR/angularjs-test-generator.git
cd angularjs-test-generator
npm install -g

Vía npm:

npm install -g angularjs-test-generator

Use

Simply go to the directory of your component, which must have these files:

  • ./module.js *
  • ./controller.js *
  • ./view.html

and at least one of this:

  • ./directive.js
  • ./component.js
cd myApp/components/my-component/
gentest

this will create the file component.spec.js

CLI Arguments

argumentdefualtdescriptionexample
-ocomponent.spec.jsdestination filegentest -o spec/myout.spec.js

Attention!

This script requires you to have your project with this configuration:

  • Webpack module builder
  • ES6 Project, with ES6 modules (babel-preset-env^)
  • Karma test runner

TODO

  • Components
    • module name from module.js
    • htmlTag -> html-tag from folder-name
    • controller functions (starting with vm.) from controller.js
    • bindings ('<', '&', '@') from component.js
    • templateCache on view.html
    • testData on fixtures.js
  • Directives -> Element, Attribute
  • Filters
  • Services

If you have any problem with this script please open a new issue describing the problem and how to replicate it.

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago