tracks/javascript/exercises/zipper/README.md in trackler-2.2.1.94 vs tracks/javascript/exercises/zipper/README.md in trackler-2.2.1.95

- old
+ new

@@ -1,11 +1,11 @@ # Zipper Creating a zipper for a binary tree. [Zippers](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) are -a way purely functional of navigating within a data structure and +a purely functional way of navigating within a data structure and manipulating it. They essentially contain a data structure and a pointer into that data structure (called the focus). For example given a rose tree (where each node contains a value and a list of child nodes) a zipper might support these operations: @@ -25,31 +25,33 @@ the `next` of the focus node, returns a new zipper) - `delete` (removes the focus node and all subtrees, focus moves to the `next` node if possible otherwise to the `prev` node if possible, otherwise to the parent node, returns a new zipper) - ## Setup +## Setup - Go through the setup instructions for JavaScript to - install the necessary dependencies: +Go through the setup instructions for JavaScript to install the + necessary dependencies: - http://exercism.io/languages/javascript/installation +http://exercism.io/languages/javascript/installation - ## Making the Test Suite Pass +## Running the test suite - Execute the tests with: +The provided test suite uses [Jasmine](https://jasmine.github.io/). +You can install it by opening a terminal window and running the +following command: - jasmine <exercise-name>.spec.js +```sh +npm install -g jasmine +``` - Replace `<exercise-name>` with the name of the current exercise. E.g., to - test the Hello World exercise: +Run the test suite from the exercise directory with: - jasmine hello-world.spec.js +```sh +jasmine zipper.spec.js +``` - All but the first test have been skipped. +In many test suites all but the first test have been marked "pending". +Once you get a test passing, activate the next one by changing `xit` to `it`. - Once you get a test passing, you can unskip the next one by - changing `xit` to `it`. - - - ## Submitting Incomplete Solutions - It's possible to submit an incomplete solution so you can see how others have completed the exercise. +## Submitting Incomplete Solutions +It's possible to submit an incomplete solution so you can see how others have completed the exercise.