Package Exports
- hygen-oja-generators
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hygen-oja-generators) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
hygen-oja-generators
The module provides hygen generators for eBay Oja framework and more specifically for Action layer.
This module is a subset of .
Given the fact that all actions have the same style and API, we now can use a simple code generation based on hygen to speed up action creation, including generation of unit tests for the new action using jest test framework.
Installation
npm install hygen hygen-add -g
hygen-add oja-generatorsUsage
hygen <command>
# or for help just type
hygenSteps
Init oja
$ hygen oja initAdd action
$ hygen action new <ACTION_NAMESPACE> [--target {output dir}] [--mocha]Note: By default command will generate jest unit tests, if you need mocha tests, you can use --mocha option
Example:
# New action generation
# will generate a new action with jest tests
$ hygen action new selling/actions/buy --target src/selling
# will generate a new action with mochs tests
$ hygen action new selling/actions/buy --target src/selling --mocha
# Run unit tests
npm run test:actions
# Run test coverage
npm run test:actions:coverage