I have just finished the Metric-Imperial Converter. Take a look if you’d like!
.env - To make sure that the Unit and Functional Tests run, make sure you put the variables in sample.env into a new “.env” file. This took me forever to understand, why the tests were not working. This issue I found is unique to Repl.it.
“L” versus “l” - A big part of this project is just chasing down the capitalization of liters, so be patient when dealing with this. Make sure that your unit tests also reflect this nuanced capitalization change, because otherwise you will either not pass the unit tests or you won’t pass the project tests. Because you are writing the unit tests yourself, you can make it work so that all tests (unit, function, and overall project tests) pass.
Null, Undefined, “Invalid” - another big aspect of this project is just understanding how and WHEN you defined “invalid” in the converter functions. Even though the returned JSON should indicate “invalid number” or “invalid unit” or both when you press enter, think about WHEN “invalid number” should be assigned for the converter function results BEFORE the json returns. This will make or break the unit tests and functional tests.