Documentation
¶
Overview ¶
Utilities for unit testing this project.
Index ¶
- Constants
- Variables
- func AddCommit(commitMessage string, filename string)
- func CommitFileChange(commitMessage string, filename string, fileContents string)
- func InitTest(t *testing.T, logLevel slog.Level) *util.TestExecutor
- func SetupSecondaryWorktree(t *testing.T) string
- func WaitForDone(t *testing.T, done <-chan struct{})
- func WaitForOutput(t *testing.T, out fmt.Stringer, expected string)
Constants ¶
View Source
const InitialCommitSubject = "Initial empty commit"
Variables ¶
View Source
var TestWorkingDir string
Functions ¶
func CommitFileChange ¶
func InitTest ¶
CD into repository directory and set any global DI variables (slog, sleep, and executor).
func SetupSecondaryWorktree ¶ added in v2.1.1
SetupSecondaryWorktree creates a secondary worktree from the current repo and changes into it. Resets cached branch values. Returns the main worktree path.
func WaitForDone ¶ added in v2.1.0
WaitForDone waits for the channel to close, or fails the test after 10 seconds.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.