test(line): narrow config schema parse failures

This commit is contained in:
Peter Steinberger
2026-05-06 07:49:27 +01:00
parent 8f3a34e2a1
commit ecf06d7abe

View File

@@ -9,7 +9,9 @@ describe("LineConfigSchema", () => {
dmPolicy: "open",
});
expect(result.success).toBe(false);
if (result.success) {
throw new Error("Expected config validation to fail");
}
expect(result.error.issues).toEqual([
expect.objectContaining({
path: ["allowFrom"],
@@ -40,7 +42,9 @@ describe("LineConfigSchema", () => {
},
});
expect(result.success).toBe(false);
if (result.success) {
throw new Error("Expected account config validation to fail");
}
expect(result.error.issues).toEqual([
expect.objectContaining({
path: ["accounts", "work", "allowFrom"],