Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 806 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 806 Bytes

Practice: Single Responsibility Principle

In this practice, you will be refactoring code to follow the Single Responsibility Principle.

Set Up

Clone the practice from the starter.

Run npm install to install all dependencies.

Directions

Take a look at the bakeAndSellPies function in the practice.js file. This function passes all the specs if you run npm test, but the function is doing too much. Refactor the function into multiple helper functions to follow the Single-Responsibility Principle.

When you are sure that you have successfully refactored the code, run npm test to see if the functions still return the correct information by making sure all the test specs still pass.