Skip to content

remos/currency-converter

Repository files navigation

currency-converter

codecov Mutation testing badge

Very basic web app written in typescript to convert an amount from a base currency to another, provided a lookup map of rates and currencies to "cross" via during the conversion.

Quickstart:

yarn
yarn serve

Then visit http://localhost:8080

Considerations

  • If the conversions and currencies maps were to become larger, loading could be performed asynchronously.
  • The conversion itself could be performed in a web worker if the number of cross-via's became an issue and started to impact rendering performance.
  • The cross-via map could be generate on the fly/when rates are updated to find the most cost effective route to the desired currency.

Libraries

Built using React + Redux with styled-components to keep styling beside the components using it.

Testing

Utilises jest, stryker and storybook with the storyshots addon for snapshot testing.

Stryker mutates code in attempt to catch faulty/missing tests and flags when tests do not fail due to the mutations

CI/CD

Builds using travisci and deploys to github pages

Scripts

yarn build

Builds app into dist directory using webpack

yarn test

Runs jest unit tests

yarn test:stryker

Runs stryker mutation testing

yarn storybook

Builds and runs storybook

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published