mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 01:04:32 +00:00
chore: Lint extensions folder.
This commit is contained in:
@@ -8,7 +8,6 @@ const mockUnbind = vi.fn();
|
||||
// Event handler storage
|
||||
let connectHandler: (() => void) | null = null;
|
||||
let disconnectHandler: ((manually: boolean, reason?: Error) => void) | null = null;
|
||||
let authFailHandler: (() => void) | null = null;
|
||||
|
||||
// Event listener mocks that store handlers and return unbind function
|
||||
const mockOnConnect = vi.fn((handler: () => void) => {
|
||||
@@ -21,8 +20,7 @@ const mockOnDisconnect = vi.fn((handler: (manually: boolean, reason?: Error) =>
|
||||
return { unbind: mockUnbind };
|
||||
});
|
||||
|
||||
const mockOnAuthenticationFailure = vi.fn((handler: () => void) => {
|
||||
authFailHandler = handler;
|
||||
const mockOnAuthenticationFailure = vi.fn((_handler: () => void) => {
|
||||
return { unbind: mockUnbind };
|
||||
});
|
||||
|
||||
@@ -65,7 +63,6 @@ describe("probeTwitch", () => {
|
||||
// Reset handlers
|
||||
connectHandler = null;
|
||||
disconnectHandler = null;
|
||||
authFailHandler = null;
|
||||
});
|
||||
|
||||
it("returns error when username is missing", async () => {
|
||||
|
||||
Reference in New Issue
Block a user