diff --git a/bin/build.sh b/bin/build.sh index 854be87..98eca95 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -35,6 +35,9 @@ FAILED_EXERCISES='' for example_file in exercises/**/*.example.elm do + # clean up generated code from last run + rm -rf tests/elm-stuff/generated-code/ + exercise_dir=$(dirname $example_file) exercise_name=$(basename $example_file .example.elm) mv "$exercise_dir/$exercise_name.elm" "$exercise_dir/$exercise_name.impl" @@ -42,7 +45,9 @@ do echo '-------------------------------------------------------' echo "Testing $exercise_name" - npm test -- $exercise_dir/tests/Tests.elm + cp "$exercise_dir/tests/Tests.elm" tests/ + + npm test -- tests/Tests.elm # capture result from last command (elm-test) if [ $? -ne 0 ]; then @@ -53,6 +58,7 @@ do # be kind, rewind mv "$exercise_dir/$exercise_name.elm" "$exercise_dir/$exercise_name.example.elm" mv "$exercise_dir/$exercise_name.impl" "$exercise_dir/$exercise_name.elm" + rm tests/Tests.elm done if [ $TEST_RESULT -ne 0 ]; then diff --git a/elm-package.json b/elm-package.json index 077e09c..25056b9 100644 --- a/elm-package.json +++ b/elm-package.json @@ -38,8 +38,7 @@ ], "exposed-modules": [], "dependencies": { - "elm-lang/core": "5.0.0 <= v < 6.0.0", - "elm-community/elm-test": "4.0.0 <= v < 5.0.0" + "elm-lang/core": "5.0.0 <= v < 6.0.0" }, "elm-version": "0.18.0 <= v < 0.19.0" } diff --git a/tests/elm-package.json b/tests/elm-package.json new file mode 100644 index 0000000..abf69f5 --- /dev/null +++ b/tests/elm-package.json @@ -0,0 +1,45 @@ +{ + "version": "3.0.0", + "summary": "Exercism problems in Elm.", + "repository": "https://github.com/exercism/xelm.git", + "license": "BSD3", + "source-directories": [ + ".", + "../exercises/hello-world", + "../exercises/leap", + "../exercises/pangram", + "../exercises/rna-transcription", + "../exercises/hamming", + "../exercises/word-count", + "../exercises/bob", + "../exercises/run-length-encoding", + "../exercises/difference-of-squares", + "../exercises/anagram", + "../exercises/raindrops", + "../exercises/triangle", + "../exercises/scrabble-score", + "../exercises/accumulate", + "../exercises/sublist", + "../exercises/sum-of-multiples", + "../exercises/strain", + "../exercises/space-age", + "../exercises/nucleotide-count", + "../exercises/series", + "../exercises/phone-number", + "../exercises/grade-school", + "../exercises/allergies", + "../exercises/robot-simulator", + "../exercises/list-ops", + "../exercises/atbash-cipher", + "../exercises/say", + "../exercises/largest-series-product", + "../exercises/roman-numerals", + "../exercises/gigasecond" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-community/elm-test": "4.0.0 <= v < 5.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +}