mirror of
https://github.com/correl/elm.git
synced 2024-12-22 11:09:08 +00:00
Merge pull request #150 from iamvery/watch-tests
Add "watch" command to all exercises
This commit is contained in:
commit
604908a29c
34 changed files with 47 additions and 0 deletions
|
@ -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`.
|
||||
|
|
|
@ -17,3 +17,9 @@ Execute the tests with:
|
|||
```bash
|
||||
$ npm test
|
||||
```
|
||||
|
||||
Automatically run tests again when you save changes:
|
||||
|
||||
```bash
|
||||
$ npm run watch
|
||||
```
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "elm-package install -y",
|
||||
"watch": "elm-test --watch",
|
||||
"test": "elm-test"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in a new issue