CLI
CLI is the command line interface for Hux. It includes features such as API contract testing. This can be used in automated testing pipelines, or locally, to ensure your clients are compatible with the data returned from the server.
Installation
NPM
npm i @hux-js/cli
Yarn
yarn add @hux-js/cli
Basic usage
Contract testing
Add the following script to the scripts
object in package.json
, where -d src/
is your app directory:
"test:contract": "hux test -d src/"
You can then call it with npm run test:contract
.
You may experience a CORS issue if you have custom whitelisting on your server. Disabling this for the development server, or if `Origin` is undefined can fix this
Contributing
If you'd like to contribute please read our Code of Conduct & Contributing guides before doing so
Full Documentation - https://huxjs.org