2.0.11 • Published 4 years ago

hygen-oja-generators v2.0.11

Weekly downloads
7
License
MIT
Repository
-
Last release
4 years ago

hygen-oja-generators

Downloads

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-generators

Usage

hygen <command>
# or for help just type
hygen

Steps

Init oja

$ hygen oja init

Add 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
2.0.11

4 years ago

2.0.9

4 years ago

2.0.10

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago