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:buildbuilds the docker image with the tagasyncapi/modelina(the rest of the scripts run this one as well).npm run docker:testruns the main test suite.npm run docker:test:blackboxruns the blackbox test suite.
To setup the environment follow these steps:
- Setup the project by first installing the dependencies
npm install - Make sure the tests pass by running
npm run testscript- blackbox testing are excluded when running the
testscript because it require some extra setup. Please refer to Blackbox testing section below. - You can update snapshots by running
npm run test:snapshots
- blackbox testing are excluded when running the
- Make sure code is well formatted and secure
npm run lint
Please refer to Docker section above if you wanna run the tests directly in Docker without configuring anything extra on your machine. If you prefer to install all the dependencies locally, keep reading.
The blackbox testing have some different requirements in order to successfully run:
- To to run the
javablackbox tests, you need to have JDK installed. - To to run the
tsblackbox tests, you need to have TypeScript installed globally -npm install -g typescript. - To to run the
C#blackbox tests, you need to have C# compiler installed globally. - https://www.mono-project.com/download/stable/
By default the blackbox tests are not run with the regular npm run test, but can be run with npm run test:blackbox.