Skip to content

Commit

Permalink
fix: add test case for BugFixSuggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Feb 3, 2024
1 parent 240d01c commit c7570f5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions translation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,20 @@ func TestBugFixGenerator(t *testing.T) {
})
})

t.Run("With punctuation", func(t *testing.T) {
gen := &lib.BugFixGenerator{
Document: doc,
}

gen.Add("This is a simple error message.", func(s *lib.BugFixSuggestion) {
s.AddStep("Oh wow!", func(step *lib.BugFixStep) {
if step.Content != "Oh wow!" {
t.Errorf("Expected 'Oh wow!', got %s", step.Content)
}
})
})
})

t.Run("With string data", func(t *testing.T) {
gen := &lib.BugFixGenerator{
Document: doc,
Expand Down

0 comments on commit c7570f5

Please sign in to comment.