Merge pull request #150 from iamvery/watch-tests

Add "watch" command to all exercises
This commit is contained in:
Erik Simmler 2017-07-06 20:01:51 -04:00 committed by GitHub
commit 604908a29c
34 changed files with 47 additions and 0 deletions

View file

@ -45,6 +45,8 @@ Please keep the following in mind:
- The recommended workflow when working on an exercise is to first create the implementation and test files, `ExerciseModuleName.elm` and `tests/Tests.elm`. You'll likely want to copy one of the existing exercise directories as a quick start.
- Test the new exercise directly by running `npm test` from the exercise directory.
- Automatically run tests again when you save changes by running `npm run watch` from the exercise directory.
- Once the implementation of the exercise is complete, rename `ExerciseModuleName.elm` to `ExerciseModuleName.example.elm` and create the template `ExerciseModuleName.elm`.
- Make sure everything is good to go by running all tests with `bin/build.sh`.

View file

@ -17,3 +17,9 @@ Execute the tests with:
```bash
$ npm test
```
Automatically run tests again when you save changes:
```bash
$ npm run watch
```

View file

@ -8,6 +8,14 @@ $ npm test
## Hints and tips
### Watch for changes
Automatically run tests again when you save changes:
```bash
$ npm run watch
```
### Coding the exercise
The README.md for each exercise gives a general description, but the Elm test program will be very specific. Open the test program and give it a quick look - if it seems like cheating, do it anyway. Look for helpful comments, test data, and just the names of the test functions. Try running the test command before you have written anything and see if the error messages give you an idea of where to start.

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {

View file

@ -4,6 +4,7 @@
"license": "MIT",
"scripts": {
"postinstall": "elm-package install -y",
"watch": "elm-test --watch",
"test": "elm-test"
},
"dependencies": {