MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_PublicAPI_SetVersionInfo

Function TestSpec_PublicAPI_SetVersionInfo

pkg/cli/spec_test.go:78–84  ·  view source on GitHub ↗

TestSpec_PublicAPI_SetVersionInfo validates that SetVersionInfo stores the version returned by GetVersion. Spec: "Sets the version at startup"

(t *testing.T)

Source from the content-addressed store, hash-verified

76// TestSpec_PublicAPI_SetVersionInfo validates that SetVersionInfo stores the version returned by GetVersion.
77// Spec: "Sets the version at startup"
78func TestSpec_PublicAPI_SetVersionInfo(t *testing.T) {
79 original := cli.GetVersion()
80 t.Cleanup(func() { cli.SetVersionInfo(original) })
81
82 cli.SetVersionInfo("v99.99.99-spec-test")
83 assert.Equal(t, "v99.99.99-spec-test", cli.GetVersion(), "GetVersion should return the value set by SetVersionInfo")
84}
85
86// TestSpec_PublicAPI_IsRunningInCI validates that IsRunningInCI returns a bool without panicking.
87// Spec: "Detects CI environment"

Callers

nothing calls this directly

Calls 2

GetVersionFunction · 0.92
SetVersionInfoFunction · 0.92

Tested by

no test coverage detected