Documentation
¶
Index ¶
- Constants
- func AssertGoldenMatch(t *testing.T, goldenFile string, actual string)
- func CaptureOutput(fn func()) (stdout, stderr string)
- func LoadGoldenFile(t *testing.T, name string) []byte
- func MockGitHubAPI(t *testing.T) *httptest.Server
- func WriteGoldenFile(t *testing.T, name string, data []byte)
- type TestComment
Constants ¶
View Source
const ( MaxGraphQLResults = 100 MaxCommentLength = 65536 DefaultPageSize = 30 )
Constants for testing
Variables ¶
This section is empty.
Functions ¶
func AssertGoldenMatch ¶
AssertGoldenMatch compares output with golden file
func CaptureOutput ¶
func CaptureOutput(fn func()) (stdout, stderr string)
CaptureOutput captures stdout and stderr from a function
func LoadGoldenFile ¶
LoadGoldenFile loads a golden file for comparison
func MockGitHubAPI ¶
MockGitHubAPI creates a mock HTTP server for GitHub API testing
Types ¶
type TestComment ¶
type TestComment struct {
ID int `json:"id"`
Body string `json:"body"`
Type string `json:"type"` // "issue" or "review"
User string `json:"user"`
CreatedAt string `json:"created_at"`
Path string `json:"path,omitempty"`
Line int `json:"line,omitempty"`
}
TestComment represents a test comment structure
func CreateTestComments ¶
func CreateTestComments() []TestComment
CreateTestComments creates a set of test comments for testing
Click to show internal directories.
Click to hide internal directories.