style: fix lint errors in test files
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 53s
CI / Lint & Test (pull_request) Failing after 5m54s
CI / Build Linux (pull_request) Has been skipped
CI / Build Windows (cross-compile) (pull_request) Has been skipped

- Remove unused imports in config.test.ts and conversations.test.ts
- Remove unused handler variable in tauri.test.ts
- Remove unused _args parameter in vitest.setup.ts mock
- Add coverage/ to eslint ignore list
This commit is contained in:
2026-01-25 23:28:45 -08:00
committed by Naomi Carrigan
parent 8cb4c17dc1
commit d3bb62210d
5 changed files with 5 additions and 15 deletions
+1 -1
View File
@@ -27,6 +27,6 @@ export default tseslint.config(
},
},
{
ignores: ["build/", ".svelte-kit/", "dist/", "src-tauri/target/", "node_modules/"],
ignores: ["build/", ".svelte-kit/", "dist/", "src-tauri/target/", "node_modules/", "coverage/"],
}
);
-5
View File
@@ -1,11 +1,6 @@
import { describe, it, expect, beforeEach, vi } from "vitest";
import { get } from "svelte/store";
import {
configStore,
isDarkTheme,
isStreamerMode,
isCompactMode,
shouldHidePaths,
maskPaths,
clampFontSize,
applyFontSize,
+3 -6
View File
@@ -1,5 +1,4 @@
import { describe, it, expect, beforeEach, vi } from "vitest";
import { get } from "svelte/store";
import { describe, it, expect } from "vitest";
// Test the Conversation interface and store behavior
describe("Conversation interface", () => {
@@ -252,7 +251,7 @@ describe("conversation management operations", () => {
});
it("uses default name when not provided", () => {
let counter = 5;
const counter = 5;
const createNewConversation = (name?: string) => ({
name: name || `Conversation ${counter}`,
});
@@ -452,9 +451,7 @@ describe("attachment management", () => {
});
it("clears all attachments", () => {
const attachments = [{ id: "att-1" }, { id: "att-2" }];
const cleared: typeof attachments = [];
const cleared: Array<{ id: string }> = [];
expect(cleared).toHaveLength(0);
});
});
-2
View File
@@ -319,8 +319,6 @@ describe("tauri event handling", () => {
describe("mock event system", () => {
it("can emit events through mock system", () => {
const handler = vi.fn();
// The emitMockEvent function should work
expect(typeof emitMockEvent).toBe("function");
});
+1 -1
View File
@@ -13,7 +13,7 @@ export function clearMockInvokeResults() {
}
vi.mock("@tauri-apps/api/core", () => ({
invoke: vi.fn((command: string, _args?: Record<string, unknown>) => {
invoke: vi.fn((command: string) => {
if (command in mockInvokeResults) {
const result = mockInvokeResults[command];
if (result instanceof Error) {