mirror of
https://github.com/correl/elm.git
synced 2024-11-22 03:00:06 +00:00
Merge branch 'master' into skip-tests
This commit is contained in:
commit
be936a14d4
35 changed files with 51 additions and 2 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.
|
- 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.
|
- 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`.
|
- 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`.
|
- Make sure everything is good to go by running all tests with `bin/build.sh`.
|
||||||
|
|
|
@ -18,5 +18,11 @@ Execute the tests with:
|
||||||
$ npm test
|
$ npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Automatically run tests again when you save changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm run watch
|
||||||
|
```
|
||||||
|
|
||||||
As you work your way through the test suite, be sure to remove the `skip <|`
|
As you work your way through the test suite, be sure to remove the `skip <|`
|
||||||
calls from each test until you get them all passing!
|
calls from each test until you get them all passing!
|
||||||
|
|
|
@ -8,6 +8,14 @@ $ npm test
|
||||||
|
|
||||||
## Hints and tips
|
## Hints and tips
|
||||||
|
|
||||||
|
### Watch for changes
|
||||||
|
|
||||||
|
Automatically run tests again when you save changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm run watch
|
||||||
|
```
|
||||||
|
|
||||||
### Coding the exercise
|
### 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.
|
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",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -2,13 +2,15 @@ module Tests exposing (..)
|
||||||
|
|
||||||
import Test exposing (..)
|
import Test exposing (..)
|
||||||
import Expect
|
import Expect
|
||||||
import Triangle exposing (triangleKind, Triangle(..))
|
import Triangle exposing (triangleKind, Triangle(..), version)
|
||||||
|
|
||||||
|
|
||||||
tests : Test
|
tests : Test
|
||||||
tests =
|
tests =
|
||||||
describe "triangleKind"
|
describe "triangleKind"
|
||||||
[ test "equilateral triangles have equal sides" <|
|
[ test "the solution is for the correct version of the test" <|
|
||||||
|
\() -> Expect.equal 2 version
|
||||||
|
, test "equilateral triangles have equal sides" <|
|
||||||
\() -> Expect.equal (Ok Equilateral) (triangleKind 2 2 2)
|
\() -> Expect.equal (Ok Equilateral) (triangleKind 2 2 2)
|
||||||
, skip <|
|
, skip <|
|
||||||
test "larger equilateral triangles also have equal sides" <|
|
test "larger equilateral triangles also have equal sides" <|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "elm-package install -y",
|
"postinstall": "elm-package install -y",
|
||||||
|
"watch": "elm-test --watch",
|
||||||
"test": "elm-test"
|
"test": "elm-test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in a new issue