Skip to content

Commit f2bb32f

Browse files
committed
test: verify default account warnings
1 parent 880530d commit f2bb32f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/commands/doctor-config-flow.missing-default-account-bindings.test.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ describe("collectMissingDefaultAccountBindingWarnings", () => {
1717
};
1818

1919
const warnings = collectMissingDefaultAccountBindingWarnings(cfg);
20-
expect(warnings).toHaveLength(1);
21-
expect(warnings[0]).toContain("channels.telegram");
22-
expect(warnings[0]).toContain("alerts, work");
20+
expect(warnings).toStrictEqual([
21+
'- channels.telegram: accounts.default is missing and no valid account-scoped binding exists for configured accounts (alerts, work). Channel-only bindings (no accountId) match only default. Add bindings[].match.accountId for one of these accounts (or "*"), or add channels.telegram.accounts.default.',
22+
]);
2323
});
2424

2525
it("does not warn when an explicit account binding exists", () => {
@@ -51,9 +51,9 @@ describe("collectMissingDefaultAccountBindingWarnings", () => {
5151
};
5252

5353
const warnings = collectMissingDefaultAccountBindingWarnings(cfg);
54-
expect(warnings).toHaveLength(1);
55-
expect(warnings[0]).toContain("subset");
56-
expect(warnings[0]).toContain("Uncovered accounts: work");
54+
expect(warnings).toStrictEqual([
55+
'- channels.telegram: accounts.default is missing and account bindings only cover a subset of configured accounts. Uncovered accounts: work. Add bindings[].match.accountId for uncovered accounts (or "*"), or add channels.telegram.accounts.default.',
56+
]);
5757
});
5858

5959
it("does not warn when wildcard account binding exists", () => {

0 commit comments

Comments
 (0)