Escape's NodeJS CLI
A CLI tool for automatically building OpenAPI descriptions and assess route testing coverage directly from local testing environment !
Installation
npm install -g @escape.tech/cli
Configuration
The CLI needs to access the following information in order to work properly
- The test framework used by the project
- The HTTP library used by the project
- The key of the project in the Escape app
These information can easily be provided by using the escape init
command
escape init
You will see the following prompter
escape | Escape CLI is up-to-date, happy fuzzing !
___ ___ ___ ___ ___ ___
/\ \ /\ \ /\ \ /\ \ /\ \ /\ \
/::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \
/::\:\__/\:\:\__/:/\:\__/::\:\__/::\:\__/::\:\__\
\:\:\/ \:\:\/__\:\ \/__\/\::/ \/\::/ \:\:\/ /
\:\/ / \::/ / \:\__\ /:/ / \/__/ \:\/ /
\/__/ \/__/ \/__/ \/__/ \/__/
? What test runner do you use for this project : Mocha
? What http library do you use for this project : Express
? Please enter the escape key url for the project : http://api.escape.tech/someKey
This command writes the configuration parameters you entered in .escaperc.json
file at the root of your project. This file will be read by the CLI for further usage.
Matrix of currently supported libraries and frameworks
HTTP lib / Test Framework | Jest v26.xx.xx | Mocha v8.xx.xx | Jasmine |
---|
ExpressJS v4.xx.xx | cover supported, discover supported | cover supported, discover supported | Not supported yet |
KoaJS v2.xx.xx | cover supported, discover supported | cover supported, discover supported | Not supported yet |
KoaJS v2.xx.xx | cover supported, discover supported | cover supported, discover supported | Not supported yet |
Usage
The CLI is used as a prefix for launching test commands :
⚠️ Launching commands using npm is not fully supported yet ! ⚠️
⚠️ Launching commands after a transformer (babel-node/ts-node) is not fully supported yet ! ⚠️
escape discover grunt validate
escape cover grunt validate
escape discover jest --forceExit --detectOpenHandles .
Contributing
Contribution guide