refactor!: rename chat providers to channels

This commit is contained in:
Peter Steinberger
2026-01-13 06:16:43 +00:00
parent 0cd632ba84
commit 90342a4f3a
393 changed files with 8004 additions and 6737 deletions

View File

@@ -5,39 +5,39 @@ import { buildPairingReply } from "./pairing-messages.js";
describe("buildPairingReply", () => {
const cases = [
{
provider: "discord",
channel: "discord",
idLine: "Your Discord user id: 1",
code: "ABC123",
},
{
provider: "slack",
channel: "slack",
idLine: "Your Slack user id: U1",
code: "DEF456",
},
{
provider: "signal",
channel: "signal",
idLine: "Your Signal number: +15550001111",
code: "GHI789",
},
{
provider: "imessage",
channel: "imessage",
idLine: "Your iMessage sender id: +15550002222",
code: "JKL012",
},
{
provider: "whatsapp",
channel: "whatsapp",
idLine: "Your WhatsApp phone number: +15550003333",
code: "MNO345",
},
] as const;
for (const testCase of cases) {
it(`formats pairing reply for ${testCase.provider}`, () => {
it(`formats pairing reply for ${testCase.channel}`, () => {
const text = buildPairingReply(testCase);
expect(text).toContain(testCase.idLine);
expect(text).toContain(`Pairing code: ${testCase.code}`);
expect(text).toContain(
`clawdbot pairing approve ${testCase.provider} <code>`,
`clawdbot pairing approve ${testCase.channel} <code>`,
);
});
}