We are building a zoo inside a computer. Each animal species in our zoo has lots of different, particular, behaviors, but all animals talk to each other in a similar way. Specifically, they all implement a speak method, the output of which is the arbitrary input string interspersed with an "animal sound" that is particular to that type of animal. For example, the lion's speak function behaves like so:
lion.speak( "I'm a lion" ); < "I'm roar a roar lion roar"
The tiger's speak function behaves similarly but with a different sound:
tiger.speak( "Lions suck" ); < "Lions grrr suck grrr"
Please write logic and classes to support our zoo in JavaScript (using whatever class model you like) with attention to code structure and readability.
Installing the current exercise using npm package
git clone https://github.com/Machi3mfl/zoo-exercise.git
npm install
The current exercise only have unit test script, you can run it using the following command:
npm run test:coverage
You will find the coverage report
in the next link.
Also, you can check the unit tests files to see how to use the solution implemented.
Added GitHub actions implementing CI/CD (Continuous Integration/Continuous Deployment) workflows like:
Added unit test suite for every file with 100% coverage
.
Deploy Coverage test report in GitHub Pages.
You can check the actions in the following link