jjtest

package
v0.16.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jjtest provides helpers for constructing real Jujutsu (jj) repositories in tests. Unlike production code, tests may shell out to the jj binary. Tests using these helpers skip when jj is not installed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRemote

func AddRemote(t *testing.T, dir, name, url string)

AddRemote registers a git remote on the jj repo at dir.

func AddWorkspace

func AddWorkspace(t *testing.T, mainDir, wsPath, name string)

AddWorkspace adds a secondary jj workspace at wsPath from the main repo at mainDir, with the given workspace name.

func InitNative

func InitNative(t *testing.T, dir string) string

InitNative creates a native (non-colocated) jj repo in dir and returns dir.

func RequireJJ

func RequireJJ(t *testing.T)

RequireJJ skips the test if the jj binary is not on PATH.

func Run

func Run(t *testing.T, workdir string, args ...string)

Run executes a jj subcommand in workdir, failing the test on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL