Code Testing
In order to enhance the DLCheck tool, code testing is mandatory, it ensures the codes' behavior to a certain extent and allows the contributors to discover bugs as they try to update the tool. The tools I chose to perform testing with my code is Jest , combined with the nock npm module. I chose to use Jest because it is one of the most popular testing frameworks for JS code and it is simple to set up and use, the nock module was extremely powerful as it allows me to manipulate requests to servers and customize the response in order to keep the test results consistent. If I have used a real url to perform the testing, for example, google.ca, Google's server may go down and be temporarily unavailable, which will fail the tests, however, with the nock module, I will always have the customized response that I want for each test.Setting up the tools mentioned above is easy, simply follow the instructions here to set up Jest, and run " npm install --save-dev n...