test(config): add schema regression tests for browser.extraArgs

This commit is contained in:
leotwang
2026-03-01 00:00:53 +08:00
committed by Peter Steinberger
parent 925117d277
commit 910c654807

View File

@@ -164,4 +164,24 @@ describe("config schema regressions", () => {
expect(res.issues[0]?.path).toBe("channels.imessage.attachmentRoots.0");
}
});
it("accepts browser.extraArgs for proxy and custom flags", () => {
const res = validateConfigObject({
browser: {
extraArgs: ["--proxy-server=http://127.0.0.1:7890"],
},
});
expect(res.ok).toBe(true);
});
it("rejects browser.extraArgs with non-array value", () => {
const res = validateConfigObject({
browser: {
extraArgs: "--proxy-server=http://127.0.0.1:7890" as unknown,
},
});
expect(res.ok).toBe(false);
});
});