Skip to content

A Pair Programing Exercise over Testing and Refactoring JavaScript

Notifications You must be signed in to change notification settings

OkcWebDevs/js-testing-and-refactoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Pair Programing Exercise over Testing and Refactoring JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published