Documentation
¶
Overview ¶
Package testgen generates AI-produced test suites for completed PM tasks. It reads the task artifact output, detects the project language, asks the provider to write appropriate tests, and writes them to .cloop/tests/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶
BuildPrompt constructs the AI prompt for test generation. Exported for independent testing.
func TestFileExt ¶
TestFileExt returns the file extension (without leading dot) for the given Lang.
Types ¶
type Lang ¶
type Lang string
Lang represents the detected project / task language.
func DetectLang ¶
DetectLang probes workDir for project files and returns the best matching Lang. Priority: go.mod > package.json > *.py files > shell (fallback).
type Result ¶
type Result struct {
Lang Lang
FilePath string // absolute path where tests were written
Code string // raw test code written
Ran bool // true if --run was used
Output string // combined stdout+stderr when Ran == true
ExitCode int // 0 = all tests passed
}
Result holds the output of a test generation run.
Click to show internal directories.
Click to hide internal directories.