Git Product home page Git Product logo

exercises.js.tdd.02's Introduction

Universal Exchange

Intro

Welcome! Are you excited for your first day as a software engineer at Quasar Soft Co.? I hope so, because you couldn't have joined at a better time.

We're just about to start development on a new module for one of our biggest clients: the Universal Exchange. What's that, you haven't heard of it? No matter. To bring you up to speed, the Universal Exchange is the organization which records the exchange rates for all known currencies within the universe! On top of that, the Universal Exchange also acts an an intermediary for anyone (or any thing) looking to buy or sell a known currency.

Based on our understanding of the client's needs, we've built out a test suite for this new module. The suite includes information about the public methods that the module will need to expose, as well as specific cases that test how each method handles valid and invalid data. And that's where you come in! We've defined the new module, but it's up to you to implement the public methods. If it helps you work, feel free to pull shared or duplicate code out into a private method, just make sure that all of the existing tests continue pass.

Alright, let's see what you can do!

Prerequisite Knowledge

You should be comfortable with:

  • JavaScript fundamentals, including:
    • data types;
    • iteration;
    • functions and methods;
    • classes;
    • basic debugging;
  • Node
  • The command line

Goal of this assignment

By the end of this exercise, you should have a good understanding of the following:

  • How to run a JavaScript test suite.
  • How to read and extract information from test cases written in JavaScript.
  • How to write code that satisfies existing tests.

Getting Started

  • Download this repository, including all README and exercise files.
  • Install the dependencies by running npm install from the command line.
  • Run the test suite using the following command: npm run test
    • Since we defined a boilerplate class in src/universal-exchange/js, the first test will pass.
    • However, since we haven't implemented the class methods, the rest of the tests will fail.

After you've completed the steps above, open the following files in your IDE of choice:

  • test/universal-exchange.test.js
  • src/universal-exchange.js

Read over the test cases in test/universal-exchange.test.js. Once you understand the requirements of the exercise, update the src/universal-exchange.js file with the code that will allow each test to pass. Make sure to test your solutions and commit often!

Instructions

  • Additional notes have been included in both the test/universal-exchange.test.js and src/universal-exchange.js files.

Submitting

Remember to submit your code when you're finished.

exercises.js.tdd.02's People

Contributors

jrmykolyn avatar

Watchers

James Cloos avatar  avatar

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.