These are some of the development guidelines and help to setup the library for development.
A Dockerfile is provided and can be used for running test suites or any other command. You can either build the image and run the needed commands manually or rather use any of the following npm scripts:
npm run docker:build
builds the docker image with the tagasyncapi/modelina
(the rest of the scripts run this one as well).npm run docker:test
runs the main test suite.npm run docker:test:blackbox
runs the BlackBox test suite.
To setup the environment follow these steps:
- Make sure to use the appropriate node version as listed in the package.json file. If you use
nvm
, you can simply donvm use
. - Setup the project by first installing the dependencies
npm install
- Make sure the tests pass by running
npm run test
script- You can update snapshots by running
npm run test -- -u
- You can update snapshots by running
- Make sure code is well formatted and secure
npm run lint
We have several BlackBox tests that are run separately from the npm run test
script. Please refer to the BlackBox documentation for further information.