Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 757 Bytes

README.md

File metadata and controls

39 lines (28 loc) · 757 Bytes

Testing and Refactoring JavaScript

A Pair Programming Exercise by OKC WebDevs

How to Use this Repo - Refactoring

Explore the before directory, and run the code there:

node before/index.js

Now see how you can refactor it. The purpose of the main function is to accept a list of positive numbers, sum them, and increase them by a tax rate of 8% for a final price.

When you're ready and want to check how we refactored things, check out the after directory.

To run the code there:

node after/index.js

How to Use this Repo - Testing

There is a simple Jest test set up for the refactored code. To set up the test environment:

cd after
npm install

To run the test suite:

npm run test