Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - [x] create `@cliBefore(functionName)` decorator. the function itself will get the `@cliBeforeEach` result object
- - [ ] create `@cliAfter(functionName)` decorator. the function itself will get the `@cliAfterEach` result object
- - [ ] generate a mock cli library
- ### generate a mock cli library
- This will generate an `<cli_name>-mock.js` library with the following methods:
- - `<cli_name>-mock.inject(parentElement, onboardingFlowName)` - will inject a terminal object with the onboarding flow loaded. if no onboardingFlowName is given, runs the basic mock flow (supports help output and shows general output if defined)
- - `<cli_name>-mock.defineOnboarding(name, flow)` - will create an onboarding flow. the `flow` param is an array of objects. each object is a step with the following attributes:
- ```javascript
- const firstStep = {
- description: 'welcome! to start, please run "myCli configure myEmail@gmail.com"',
- forcedRun: 'myCli configure myEmail@gmail.com'
- output: 'this is the example output!'
- };
- ```
- then, the onboarding will be less generic and guide the user to run a speicific flow.
- The only other functions the user can run in this mode besides the defined function, is the `--help` functions
Add Comment
Please, Sign In to add comment