feat: expand skill command registration
This commit is contained in:
48
src/config/commands.test.ts
Normal file
48
src/config/commands.test.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveNativeSkillsEnabled } from "./commands.js";
|
||||
|
||||
describe("resolveNativeSkillsEnabled", () => {
|
||||
it("uses provider defaults for auto", () => {
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "discord",
|
||||
globalSetting: "auto",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "telegram",
|
||||
globalSetting: "auto",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "slack",
|
||||
globalSetting: "auto",
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "whatsapp",
|
||||
globalSetting: "auto",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("honors explicit provider settings", () => {
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "slack",
|
||||
providerSetting: true,
|
||||
globalSetting: "auto",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
resolveNativeSkillsEnabled({
|
||||
providerId: "discord",
|
||||
providerSetting: false,
|
||||
globalSetting: true,
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user