feat(FN-4394): complete Step 1 — add heartbeat scope discipline types and defaults
Fusion-Task-Id: FN-4394 Fusion-Task-Lineage: 1e7ad660-2cd2-40ba-b7b8-7ef552c6fa13
This commit is contained in:
@@ -89,6 +89,12 @@ describe("settings key parity", () => {
|
||||
expect(isGlobalSettingsKey("autoClaimCandidatesInPrompt")).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps heartbeatScopeDiscipline project-scoped with strict default", () => {
|
||||
expect(DEFAULT_PROJECT_SETTINGS.heartbeatScopeDiscipline).toBe("strict");
|
||||
expect(isProjectSettingsKey("heartbeatScopeDiscipline")).toBe(true);
|
||||
expect(isGlobalSettingsKey("heartbeatScopeDiscipline")).toBe(false);
|
||||
});
|
||||
|
||||
it("documents autoClaimCandidatesInPrompt expected integer range", () => {
|
||||
const inRange = [0, 1, 5, 10];
|
||||
const outOfRange = [-1, 11, 100];
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
validateDirectMergeCommitStrategy,
|
||||
validateGithubAuthMode,
|
||||
validateGithubRepoSlug,
|
||||
validateHeartbeatScopeDisciplineMode,
|
||||
validateUnavailableNodePolicy,
|
||||
} from "../settings-validation.js";
|
||||
|
||||
@@ -47,6 +48,20 @@ describe("settings-validation", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("validateHeartbeatScopeDisciplineMode", () => {
|
||||
it("accepts supported modes", () => {
|
||||
expect(validateHeartbeatScopeDisciplineMode("strict")).toBe("strict");
|
||||
expect(validateHeartbeatScopeDisciplineMode("lite")).toBe("lite");
|
||||
expect(validateHeartbeatScopeDisciplineMode("off")).toBe("off");
|
||||
});
|
||||
|
||||
it("returns undefined for invalid values", () => {
|
||||
expect(validateHeartbeatScopeDisciplineMode("minimal")).toBeUndefined();
|
||||
expect(validateHeartbeatScopeDisciplineMode(123)).toBeUndefined();
|
||||
expect(validateHeartbeatScopeDisciplineMode(undefined)).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("validateGithubRepoSlug", () => {
|
||||
it("accepts valid owner/repo slugs", () => {
|
||||
expect(validateGithubRepoSlug("owner/repo")).toBe("owner/repo");
|
||||
|
||||
Reference in New Issue
Block a user