You should be able to use this guide to…
- Check code styling and linting
- Run CLI, GUI and Installer tests
- Learn how to write tests
Code linting and standards
Kalabox implements some basic linting and code standards to make sure things remain consistent between developers and to prevent syntax errors. You can easily check whether your code matches these standards using grunt.
USE EXTREME CAUTION
If you run these tests on a machine that already has Kalabox installed it is most likely going to wipe away your currently installed version of Kalabox. For that reason please BE CAREFUL USING THIS!!!
The installer tests use the BATS framework.
Tests reside in the “test” folder. For examples of unit tests look for “.spec.js” files in the “test” folder. For examples of functional tests look for “.bats” files in the “test” folder.
Looking at existing tests will give you a good idea of how to write your own, but if you’re looking for more tips, we recommend: