Skip to content

Commit

Permalink
fix 🐛: added coverage test for scope skip
Browse files Browse the repository at this point in the history
  • Loading branch information
muandane committed Dec 14, 2023
1 parent f66f155 commit 690d5de
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pkg/utils/askQuestions_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package utils

import (
"testing"

"github.com/muandane/goji/pkg/config"
"github.com/muandane/goji/pkg/models"
)

func TestIsInSkipQuestions(t *testing.T) {
list := []string{"Scopes", "Types"}
if !isInSkipQuestions("Scopes", list) {
t.Errorf("isInSkipQuestions() returned unexpected result")
}
}

func convertGitmojiToCommitType(gitmojis []config.Gitmoji) []models.CommitType {
commitTypes := make([]models.CommitType, len(gitmojis))
for i, gitmoji := range gitmojis {
commitTypes[i] = models.CommitType{
Emoji: gitmoji.Emoji,
Code: gitmoji.Code,
Description: gitmoji.Description,
Name: gitmoji.Name,
}
}
return commitTypes
}

0 comments on commit 690d5de

Please sign in to comment.