* refactor: move Discord channel implementation to extensions/discord/src/ Move all Discord source files from src/discord/ to extensions/discord/src/, following the extension migration pattern. Source files in src/discord/ are replaced with re-export shims. Channel-plugin files from src/channels/plugins/*/discord* are similarly moved and shimmed. - Copy all .ts source files preserving subdirectory structure (monitor/, voice/) - Move channel-plugin files (actions, normalize, onboarding, outbound, status-issues) - Fix all relative imports to use correct paths from new location - Create re-export shims at original locations for backward compatibility - Delete test files from shim locations (tests live in extension now) - Update tsconfig.plugin-sdk.dts.json rootDir from "src" to "." to accommodate extension files outside src/ - Update write-plugin-sdk-entry-dts.ts to match new declaration output paths * fix: add importOriginal to thread-bindings session-meta mock for extensions test * style: fix formatting in thread-bindings lifecycle test
38 lines
985 B
TypeScript
38 lines
985 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { __testing } from "./provider.js";
|
|
|
|
describe("resolveThreadBindingsEnabled", () => {
|
|
it("defaults to enabled when unset", () => {
|
|
expect(
|
|
__testing.resolveThreadBindingsEnabled({
|
|
channelEnabledRaw: undefined,
|
|
sessionEnabledRaw: undefined,
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("uses global session default when channel value is unset", () => {
|
|
expect(
|
|
__testing.resolveThreadBindingsEnabled({
|
|
channelEnabledRaw: undefined,
|
|
sessionEnabledRaw: false,
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
|
|
it("uses channel value to override global session default", () => {
|
|
expect(
|
|
__testing.resolveThreadBindingsEnabled({
|
|
channelEnabledRaw: true,
|
|
sessionEnabledRaw: false,
|
|
}),
|
|
).toBe(true);
|
|
expect(
|
|
__testing.resolveThreadBindingsEnabled({
|
|
channelEnabledRaw: false,
|
|
sessionEnabledRaw: true,
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
});
|