Fix tests (#106)

Fixes #100

* Upgrade Node Test Runner and Test Files
* Avoid Installing Deps in Each Exercise
This commit is contained in:
Erik Simmler 2016-08-22 20:31:41 -04:00 committed by GitHub
parent 4487381ad7
commit 8f82b36223
61 changed files with 69 additions and 61 deletions

View file

@ -7,7 +7,7 @@ sudo: false
install:
- nvm install 6
- nvm use 6
- npm install -g elm@0.17.1 elm-test@0.17.1
- npm install -g elm@0.17.1 elm-test@0.17.3
- elm package install -y
script:

View file

@ -79,7 +79,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -3,6 +3,8 @@
declare -i TEST_RESULT=0
FAILED_EXERCISES=''
elm-package install
for example_file in exercises/**/*.example
do
exercise_dir=$(dirname $example_file)
@ -12,14 +14,20 @@ do
echo '-------------------------------------------------------'
echo "Testing $exercise"
elm-package install
# prevent elm-test from installing dependencies
mv $exercise_dir/elm-package.json $exercise_dir/elm-package.json.disabled
elm-test $exercise_dir/*Tests.elm
# capture result from last command (elm-test)
if [ $? -ne 0 ]; then
TEST_RESULT=1
FAILED_EXERCISES+="$exercise\n"
fi
# be kind, rewind
mv $exercise_dir/elm-package.json.disabled $exercise_dir/elm-package.json
if [ $WITH_FORMAT ]; then
elm-format $exercise_dir/*.elm --yes
fi

View file

@ -5,5 +5,5 @@ The simplest way to install Elm is via Node.js/NPM.
If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform and `elm-test`.
```bash
$ npm install --global elm elm-test
$ npm install --global elm@0.17.1 elm-test@0.17.3
```

View file

@ -38,7 +38,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -31,7 +31,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -50,7 +50,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -93,7 +93,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -37,7 +37,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -150,7 +150,7 @@ gibberishQuestion length =
(gibberish length anyCharacter) ++ "?"
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -39,7 +39,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -61,7 +61,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -41,7 +41,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -22,7 +22,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -47,7 +47,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -27,7 +27,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -69,7 +69,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -27,7 +27,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -49,7 +49,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -37,7 +37,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -43,7 +43,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -27,7 +27,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -142,7 +142,7 @@ assertionList xs ys =
List.map2 Expect.equal xs ys
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -85,7 +85,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -39,7 +39,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -88,7 +88,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -45,7 +45,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -29,7 +29,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -82,7 +82,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -51,7 +51,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -25,7 +25,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -41,7 +41,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

View file

@ -38,7 +38,7 @@ tests =
]
main : Program Never
main : Program Value
main =
run emit tests

View file

@ -10,7 +10,7 @@
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-community/elm-test": "2.0.0 <= v < 3.0.0",
"rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0"
"rtfeldman/node-test-runner": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}