Refactor the code to something nicer!
There is no right answer, it's about getting to a cleaner solution.
Taken from a refactoring golf exercise by Mr Dave, however, please note the name is deceiving in our fork, this has nothing to do with golf.
You should be good to install node modules and then run tests:
npm install
npm test
or run the tests in watch mode:
npm test -- --watch
Please run ./install-nvm.sh
to install NVM and setup your device.