Skip to content

WealthWizardsEngineering/ww-code-test

Repository files navigation

ww-code-test

In this test you will find a wide cross section of the type of code you will be exposed to at Wealth Wizards.

There is no time limit to this test, so feel free to take as little or as long as you need to complete each section.
If you don't have enough free time to complete every section, instead you can let us know what you would improve on if you had more time.

If you have any questions or want more information, please do send us a message.

Good luck


Instructions

  • Click Use this template to create a private repository in your own github account
  • Invite the github user @wealthwizardsreviewer as a collaborator on your repo
  • Run yarn to install packages
  • Commit all your work on a new branch
  • When you are ready raise a pull request against the master branch of your repo and add us as reviewers
  • Add a simple description to your PR outlining which parts of the test have been completed and any comments you feel support your submission
  • If it is unlikely we will be able to identify you from your github username please add your name/email to your PR so we know who you are

Once you've submitted your pull request we'll aim to give feedback on your submission as soon as possible (usually within a few working days).

You're not expected to address any of this feedback, and we won't be able to review any further submissions.


Part A. Fix the unit tests that are broken

Run this command to see the result of the unit tests, you will need to implement the empty function at line:27 of src/services/national-insurance.js in order to make the failing unit tests pass.

yarn test:unit

Part B. Fix the feature tests that are broken after completion of Part A.

Run this command to see the result of the feature tests, you will need to implement the missing feature of the API that is indicated by the failing tests.

yarn test:feature

Part C. Build a simple React application that should allow a user to compare their national insurance contributions between 2018/19 and 2019/20

Run this command to run the application locally.

yarn dev

Alternatively you can run this command to bring the application up in the provided docker container:

make dev

There are a number of packages pre-installed with this codebase, feel free to use any you see fit or add any of your own choosing.

The placeholder application can be browsed to on:

http://localhost:8080

There is a single API route accessible through the following request:

curl -X POST http://localhost:8080/v1/national-insurance -H 'Content-Type: application/json' -d '{"income": 1234}'

Additional Information

This code test was written on macOS but will run natively on Linux and Windows 10 as well as in the provided devcontainer. The code test requires Node.js 18.x (which is in LTS) and we advocate using a node version management tool such as n to help in managing your node versions.

Windows Users

When running on Windows 10 our preference was to follow this guide to using Windows Subsystem for Linux and installing Bash through the Ubuntu distro in the Windows Store.

Linux Users

Users of Ubuntu should be aware that in some versions of the distro there are extra hurdles around the aliasing of the yarn command by the cmdtest library and the use of nodejs rather than node, this page provides details on rectifying these problems.

Remote Containers

If you're using VS Code and Docker, and have the Remote - Containers VS Code extensions installed the project can be opened in a container.

More information about developing in a container can be found in the VS Code documentation.

If you would like to attempt the test in your browser and are part of the beta, this project is also configured to run in GitHub Codespaces. Please be aware GitHub may charge for use of this service.

More information about GitHub codespaces can be found in the GitHub documentation.