generated from nhcarrigan/template
style: fix lint errors in test files
- 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:
+1
-1
@@ -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/"],
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user