feat: make development builds visibly identifiable
This commit is contained in:
1 parent
0554f41d12
commit
2ed9bf0236
13 files changed
+285
-35
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { buildCleanupPlan, classifyExitCode, parseDevHygieneArgs, type Finding } from "./dev-hygiene.ts";
|
||||
import { buildCleanupPlan, classifyExitCode, isCompatibleBinaryVersion, parseDevHygieneArgs, type Finding } from "./dev-hygiene.ts";
|
||||
|
||||
describe("dev hygiene tooling", () => {
|
||||
test("only accepts development-scoped modes and confirmation flags", () => {
|
||||
@@ -16,6 +16,13 @@ describe("dev hygiene tooling", () => {
|
||||
expect(classifyExitCode([finding("blocked")])).toBe(3);
|
||||
});
|
||||
|
||||
test("accepts a development build based on the current stable version", () => {
|
||||
expect(isCompatibleBinaryVersion("0.8.6", "0.8.6")).toBe(true);
|
||||
expect(isCompatibleBinaryVersion("0.8.6-dev.2+gabc1234", "0.8.6")).toBe(true);
|
||||
expect(isCompatibleBinaryVersion("0.8.5-dev.1+gold", "0.8.6")).toBe(false);
|
||||
expect(isCompatibleBinaryVersion(undefined, "0.8.6")).toBe(false);
|
||||
});
|
||||
|
||||
test("only plans deletion for clean merged worktrees and local branches", () => {
|
||||
const snapshot = {
|
||||
repository: {} as any,
|
||||
|
||||
Reference in new issue
Block a user