test: tighten update channel display precedence

This commit is contained in:
Peter Steinberger 2026-03-14 00:56:42 +00:00
parent 9050aa9efd
commit 91f725a998
1 changed files with 14 additions and 0 deletions

View File

@ -180,6 +180,20 @@ describe("resolveUpdateChannelDisplay", () => {
});
});
it("prefers git tag precedence over branch metadata in the derived label", () => {
expect(
resolveUpdateChannelDisplay({
installKind: "git",
gitTag: "v2026.2.24-beta.1",
gitBranch: "feature/test",
}),
).toEqual({
channel: "beta",
source: "git-tag",
label: "beta (v2026.2.24-beta.1)",
});
});
it("does not synthesize git metadata when both tag and branch are missing", () => {
expect(
resolveUpdateChannelDisplay({