View the source on GitHub or Glitch.
I created this app as a requirement for my freeCodeCamp Information Security and Quality Assurance Certification, using Node.js, Express, and Chai. The above front end API test also uses Bootstrap, jQuery, and highlight.js.
You can read the unit and functional tests I wrote on
GitHub
or
Glitch. To run the tests yourself, fork/remix this project, create a
.env
file containing NODE_ENV="test"
, start
the server, and look at the server console logs.
This project fulfills the following user stories:
/api/convert
with a single parameter
containing an accepted number and unit and have it converted.
initNum
,
initUnit
, returnNum
,
returnUnit
, and string
spelling out units in
format
{initNum} {initial_Units} converts to {returnNum}
{return_Units}
with the result rounded to 5 decimals.