Files
openclaw/extensions/slack/src/shared.test.ts
Vincent Koc 9e389cff3d fix(config): migrate legacy group allow aliases (#60597)
* fix(config): migrate legacy group allow aliases

* fix(config): inline legacy streaming migration helpers

* refactor(config): rename legacy account matcher helper

* chore(agents): codify config contract boundaries

* fix(config): keep legacy allow aliases writable

* Update AGENTS.md
2026-04-04 11:15:32 +09:00

26 lines
622 B
TypeScript

import { describe, expect, it } from "vitest";
import { setSlackChannelAllowlist } from "./shared.js";
describe("setSlackChannelAllowlist", () => {
it("writes canonical enabled entries for setup-generated channel allowlists", () => {
const result = setSlackChannelAllowlist(
{
channels: {
slack: {
accounts: {
work: {},
},
},
},
},
"work",
["C123", "C456"],
);
expect(result.channels?.slack?.accounts?.work?.channels).toEqual({
C123: { enabled: true },
C456: { enabled: true },
});
});
});