chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -36,10 +36,8 @@ vi.mock("./send.js", () => ({
|
||||
}));
|
||||
|
||||
vi.mock("../pairing/pairing-store.js", () => ({
|
||||
readChannelAllowFromStore: (...args: unknown[]) =>
|
||||
readAllowFromStoreMock(...args),
|
||||
upsertChannelPairingRequest: (...args: unknown[]) =>
|
||||
upsertPairingRequestMock(...args),
|
||||
readChannelAllowFromStore: (...args: unknown[]) => readAllowFromStoreMock(...args),
|
||||
upsertChannelPairingRequest: (...args: unknown[]) => upsertPairingRequestMock(...args),
|
||||
}));
|
||||
|
||||
vi.mock("../config/sessions.js", () => ({
|
||||
@@ -50,8 +48,7 @@ vi.mock("../config/sessions.js", () => ({
|
||||
|
||||
vi.mock("@slack/bolt", () => {
|
||||
const handlers = new Map<string, (args: unknown) => Promise<void>>();
|
||||
(globalThis as { __slackHandlers?: typeof handlers }).__slackHandlers =
|
||||
handlers;
|
||||
(globalThis as { __slackHandlers?: typeof handlers }).__slackHandlers = handlers;
|
||||
const client = {
|
||||
auth: { test: vi.fn().mockResolvedValue({ user_id: "bot-user" }) },
|
||||
conversations: {
|
||||
@@ -118,9 +115,7 @@ beforeEach(() => {
|
||||
updateLastRouteMock.mockReset();
|
||||
reactMock.mockReset();
|
||||
readAllowFromStoreMock.mockReset().mockResolvedValue([]);
|
||||
upsertPairingRequestMock
|
||||
.mockReset()
|
||||
.mockResolvedValue({ code: "PAIRCODE", created: true });
|
||||
upsertPairingRequestMock.mockReset().mockResolvedValue({ code: "PAIRCODE", created: true });
|
||||
});
|
||||
|
||||
describe("monitorSlackProvider tool results", () => {
|
||||
@@ -285,9 +280,7 @@ describe("monitorSlackProvider tool results", () => {
|
||||
channels: { C1: { allow: true, requireMention: false } },
|
||||
},
|
||||
},
|
||||
bindings: [
|
||||
{ agentId: "support", match: { channel: "slack", teamId: "T1" } },
|
||||
],
|
||||
bindings: [{ agentId: "support", match: { channel: "slack", teamId: "T1" } }],
|
||||
};
|
||||
|
||||
const client = getSlackClient();
|
||||
@@ -335,9 +328,7 @@ describe("monitorSlackProvider tool results", () => {
|
||||
SessionKey?: string;
|
||||
ParentSessionKey?: string;
|
||||
};
|
||||
expect(ctx.SessionKey).toBe(
|
||||
"agent:support:slack:channel:C1:thread:111.222",
|
||||
);
|
||||
expect(ctx.SessionKey).toBe("agent:support:slack:channel:C1:thread:111.222");
|
||||
expect(ctx.ParentSessionKey).toBe("agent:support:slack:channel:C1");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user