Skip to content

Machi3mfl/zoo-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contents

Exercise

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.

Installation

Installing the current exercise using npm package

git clone https://github.com/Machi3mfl/zoo-exercise.git
npm install

Run unit tests suite

The current exercise only have unit test script, you can run it using the following command:

npm run test:coverage

Screenshot 2023-01-14 at 20 01 42

You will find the coverage report in the next link.

Screenshot 2023-01-14 at 19 59 54

Also, you can check the unit tests files to see how to use the solution implemented.

GitHub Actions

Added GitHub actions implementing CI/CD (Continuous Integration/Continuous Deployment) workflows like:

Unit test suite

Added unit test suite for every file with 100% coverage.

Deploy

Deploy Coverage test report in GitHub Pages.

You can check the actions in the following link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published