MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / TestIssue_Properties

Function TestIssue_Properties

test/rule_test.go:537–548  ·  view source on GitHub ↗

--- Issue properties ---

(t *testing.T)

Source from the content-addressed store, hash-verified

535// --- Issue properties ---
536
537func TestIssue_Properties(t *testing.T) {
538 issue := lint.NewIssue("test desc", "info1", "info2")
539 if issue.Description() != "test desc" {
540 t.Errorf("got desc %q", issue.Description())
541 }
542 if len(issue.Infos()) != 2 {
543 t.Errorf("expected 2 infos, got %d", len(issue.Infos()))
544 }
545 if issue.Infos()[0] != "info1" {
546 t.Errorf("got info[0] %q", issue.Infos()[0])
547 }
548}
549
550func TestIssue_NoInfos(t *testing.T) {
551 issue := lint.NewIssue("desc only")

Callers

nothing calls this directly

Calls 3

DescriptionMethod · 0.95
InfosMethod · 0.95
NewIssueFunction · 0.92

Tested by

no test coverage detected