Coder Social home page Coder Social logo

banking-kata's Introduction

Banking Kata

Develop an application that can deposit funds, withdraw funds and print a statement of a customer’s bank account activity.

Here's the specification for an acceptance test that expresses the desired behaviour for this:

Given a client makes a deposit of 1000 on 10/01/2021
And a deposit of 2000 on 13/01/2021
And a withdrawal of 500 on 14/01/2021
When they print their bank statement

Then they would see:

Date || Amount || Balance  
14/01/2021 || -500 || 2500  
13/01/2021 || 2000 || 3000  
10/01/2021 || 1000 || 1000

Further Guidance

  • Writing your tests first may help steer you in your design, you can use a testing framework such as Mocha.
  • Don't worry about spacing and indentation in the statement output. (You could instruct your acceptance test to ignore whitespace if you wanted to.)
  • Use the acceptance test to guide your progress towards the solution.
  • When in doubt, go for the simplest solution!
  • You can Google syntax.

You may want to start with a deposit(amount) function and go from there…

Pre-requisties

  • Node.js
  • Git client (optional)

Download

If you have git installed then you can run the following commands in your terminal:

git clone https://github.com/think-money/banking-kata.git

Alternatively download and unzip the folder from GitHub.

Setup

npm install

Run npm test in the console to ensure that the Jest framework is working correctly. Happy coding!

banking-kata's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.