-
Notifications
You must be signed in to change notification settings - Fork 51
QUALITY ASSURANCE AND TESTING
Our Teams believes in building quality products, therefore we always ensure that all the features or bug fixes made to this project are well tested.
We have added CI integration to our project to make sure that we achieved a desired (100%) coverage. Any PR that is not well tested will not be merged. Therefore it is important for you to make sure that youR code is well tested before making a PR.
Our testing environment consists of the following packages and tools:
Our tests are located in the tests
folder. We have divided them into two categories:
- Behaviour
- Unit
These tests are used to test the behaviour of the module when exposed to different scenarios. This might include no role, no rules etc. These are meant to ensure that this module will provide consistent and accurate response in each given scenario.
context('When config file path is specified', function() {
it('Should return a map of the ACL rules', function() {
// test cases
});
});
This are test cases that test individual methods used in this module.
describe('Utils.whenGlobAndActionAllow', function() {
context('When the Methods are a string', function() {
it('should call next when method is string and *', function() {
// test casess
});
});
});
To effectively execute local testing, you will be required to install docker client on your local machine. Refer to docker installation guide fo your specific OS.
After installing docler client, You can run tests by running
$ npm run test-dev
This command will buind the docker image and run the tests in it. If you are running this command for the first time it might take a while.
©copyright No one cares.....