This function passed, but it contains a bug that the elm analyzer caught: The variable monsterAttack was unused. The tests didn’t catch that, which should be fixed, I think.
For myself I simply added some string (“This is a previous attack.”) instead of empty strings to all the tests, like this:
tests =
describe "MonsterAttack"
[ describe "3"
[ test "attack1 should attack with sword twice and claw twice" <|
\_ ->
attack1 "This is a previous attack."
|> Expect.equal
"This is a previous attack.Attacked with sword of strength 5.Attacked with claw of strength 1.Attacked with claw of strength 1.Attacked with sword of strength 5."
]
]
This might be a bit too stupid and it might be confusing for students to find the unexpected “This is a previous attack.” string missing in their output.
Oh, ok, thanks for telling me! I did exactly that on other tracks and learned that both issues and PRs aren’t open anymore and are auto-closed because the maintenance burden for track maintainers has became a problem.
Happy to hear that this is not the case for Elm!
I’ll make some PRs for the uncontroversial small changes and issues if something is more complicated
Thanks for honouring the forum-creation thing (and for your help in general)!
Just so you understand the issues vs forum thing, each track is tagged with either community-contributions-paused or community-contributions-accepted. Paused tracks have issues/PRs automatically closed. They’re ones with either no dedicated maintainers (where a forum chat often means something gets done by the wider maintainer community), or tracks that get overwhelmed by lower-quality issues/PRs.
For tracks that have them accepted, you can generally either use the forum or GitHub. Maintainers tend to have a personal preference (generally depending on how regularly they hang out here and how crazy their GH notifications are!) but either is considered ok from Exercism’s perspective