- Install Node Version Manager (NVM)
Then follow the instructions to update your
brew install nvm
~/.bash_profile
. - Open a new terminal
- Install the latest version of Node.js, currently
18.1.0
.nvm install 18
- Install Node.js dependencies
npm install
- Run all tests
jest
- See test coverage
jest --coverage
I decided to start by developing the deposit function,
- increasing the balance by a given amount
- storing the amount increased by
- storing the balance after deposit
- storing the date of the deposit
Next, I moved onto the withdrawal function,
- decreasing the balance by a given amount
- not allowing withdrawal of money not in the account
- storing the amount decreased by
- storing the balance after withdrawal
- storing the date of the withdrawal
Lastly, I ensured the format of the statement was correct per the given spec.