Each folder includes:
readme.md- The challenge/code instructions. This also includes hints, tests and a dropdown with the solution code as well as the explanation of the solution code.[name].js- This is your working file. It has the name of the function and the function is exported. No parameters are passed to the function. That is up to you to add.[name]-run.js- File to run the code manually. The function is already imported and called with expected parameters.[name]-solution.jsThe solution code with heavy commenting. Some challenges have multiple solutions. If you want the solution without comments, look in thereadme.mdfile.[name]-test.js- Jest tests for the solution code. You will need to rename this file to[name].test.jsto run the tests.
In order for the Jest tests to run, you need to rename the test file to [name].test.js. For example, if you are working on the hello-world challenge, you need to rename the hello-world-test.js file to hello-world.test.js. This is because Jest looks for files with the .test.js extension.
Run the command npm run test from the root directory and it will run all the tests.
- Clone the repo
- Run
npm install - Run
npm run testto run the tests. Again, you will need to rename the test files and replace the-testwith.testto run the tests.
- bin2dec