Fix linter

This commit is contained in:
Armin Ronacher 2025-07-06 12:18:49 +02:00 committed by Peter Steinberger
parent 6fd74b6282
commit 36337cfd7a
3 changed files with 5 additions and 6 deletions

View file

@ -1,9 +1,10 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { DirectKeyboardManager } from '../components/session-view/direct-keyboard-manager';
import type { InputManager } from '../components/session-view/input-manager';
describe('DirectKeyboardManager', () => {
let manager: DirectKeyboardManager;
let mockInputManager: { sendInputText: ReturnType<typeof vi.fn> };
let mockInputManager: Pick<InputManager, 'sendInputText'>;
let originalRequestAnimationFrame: typeof requestAnimationFrame;
beforeEach(() => {
@ -17,7 +18,7 @@ describe('DirectKeyboardManager', () => {
manager = new DirectKeyboardManager('test');
mockInputManager = { sendInputText: vi.fn() };
manager.setInputManager(mockInputManager as any);
manager.setInputManager(mockInputManager as InputManager);
// Mock clipboard API using Object.defineProperty
Object.defineProperty(navigator, 'clipboard', {

View file

@ -154,9 +154,7 @@ describe('screencap routes', () => {
});
it('should have all expected routes', () => {
const expectedRoutes = [
{ path: '/screencap', method: 'get' },
];
const expectedRoutes = [{ path: '/screencap', method: 'get' }];
for (const expected of expectedRoutes) {
expect(routes).toContainEqual(expect.objectContaining(expected));

View file

@ -73,4 +73,4 @@ export function createScreencapRoutes(): Router {
});
return router;
}
}