SamuelWitke / eloquentjs-problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eloquent JavaScript Problem Set

Build Status

This repository contains tests for the problems in chapters 4, 5, and 13 of the Eloquent JavaScript book. The tests are written using the Jest testing framework.

Submission Instructions

  1. Fork this repository

  2. Clone your own repository

git clone https://github.com/MY_USERNAME/eloquentjs-problems.git

  1. Open the repo in your Text Editor

  2. On the command line, run:

cd eloquentjs-problems

npm install

It is recommended that you are using Node 6 or 8. If you followed my instructions during orientation, then you should have at least one of these installed. If not follow the NVM instructions here.

  1. Run the tests with one of the following

npm test - will run all tests once, you may prefer the following:

npm test -- --watch - this will run the tests and will continue watching your files for modifications and will automatically rerun your tests.

  1. Add your solutions to the files: chapter04.js, chapter05.js, and chapter13.js. You do not have to modify the test files chapter04.test.js, chapter05.test.js, and chapter13.test.js.

  2. Commit and Push your changes.

  3. Create a Pull Request to notify us of your submission.

  4. DONE!

About the tests

Testing is an important aspect of developing software. It ensures that we meet our initial specifications, and ensures future changes and/or optimizations do not break our software.

There are many testing frameworks available for JavaScript, all with their own merits. Here we opted for the Jest framework as it is commonly used with React, a library we will be using in this program.

To learn more about the Jest library you can start here:

Jest - Getting Started

and here:

Jest - Using matchers

and finally I recommend you go over the tests I wrote for these problems. The tests check a couple of cases for each function, but they can certainly be improved by checking more edge cases.

BONUS POINTS: If you come up with more tests, write them and create a Pull Request so we can improve this test suite together!

About


Languages

Language:JavaScript 100.0%