Skip to content

Commit

Permalink
change typo and update subtest description
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-kroon committed Jan 29, 2024
1 parent f44625c commit c285406
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions exercises/practice/dnd-character/dnd_character_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ func TestModifier(t *testing.T) {

func TestAbility(t *testing.T) {
for i := 0; i < 10; i++ {
t.Run("", func(t *testing.T) {
t.Run("should generate ability score within accepted range", func(t *testing.T) {
got := Ability()
if !inAcceptedRange(got) {
t.Fatal("Ability score is not within accepted range (3-18)")
}
assertAbilityScoreInRange(t, "random", got)
})
}
}
Expand Down Expand Up @@ -67,6 +65,6 @@ func assertAbilityScoreInRange(t testing.TB, ability string, score int) {
t.Helper()

if !inAcceptedRange(score) {
t.Fatalf("%s score is not withing accepted range. Got %d", ability, score)
t.Fatalf("%s score is not within accepted range. Got %d", ability, score)
}
}

0 comments on commit c285406

Please sign in to comment.