Make strict startup content checks optional

This commit is contained in:
vorotamoroz committed 2026-10-26 18:15:51 +00:00
1 parent e83aa892b4
commit e46c05ddc2
13 files changed
+1029 -23

No files matched your search

@@ -17,7 +17,7 @@ const rangeMessages = {
};
describe("Advanced setting specifications", () => {
it("lists only the ten controls currently exposed by the Advanced page", () => {
it("lists only the eleven controls currently exposed by the Advanced page", () => {
const groups = createAdvancedSettingSpecGroups({ isCouchDB: () => true });
expect(groups.map(({ heading }) => heading)).toEqual([
@@ -30,6 +30,7 @@ describe("Advanced setting specifications", () => {
"hashCacheMaxCount",
"chunkSplitterVersion",
"customChunkSize",
"strictContentCheckOnStartup",
"pathNormalizationVersion",
"readChunksOnline",
"useOnlyLocalChunk",
@@ -40,6 +41,17 @@ describe("Advanced setting specifications", () => {
]);
});
it("exposes strict content checking as an ungated Advanced toggle", () => {
const spec = createAdvancedSettingSpecGroups({ isCouchDB: () => false })
.find(({ heading }) => heading === "Local Database Tweak")
?.items.find(({ key }) => key === "strictContentCheckOnStartup");
if (!spec) throw new Error("Strict content checking is not exposed on the Advanced page");
expect(spec.control).toEqual({ type: "toggle" });
expect(spec.visible).toBeUndefined();
expect(spec.disabled).toBeUndefined();
});
it("keeps path identity and the four remote chunk controls CouchDB-only", () => {
let couchDB = false;
const groups = createAdvancedSettingSpecGroups({ isCouchDB: () => couchDB });