chore: format
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 54s
CI / Lint & Test (pull_request) Failing after 5m52s
CI / Build Linux (pull_request) Has been skipped
CI / Build Windows (cross-compile) (pull_request) Has been skipped

This commit is contained in:
2026-01-25 23:35:03 -08:00
parent d3bb62210d
commit be25152eea
4 changed files with 6 additions and 16 deletions
+1 -5
View File
@@ -1,9 +1,5 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import {
NotificationType,
NOTIFICATION_SOUNDS,
type NotificationSound,
} from "./types";
import { NotificationType, NOTIFICATION_SOUNDS, type NotificationSound } from "./types";
// Mock HTMLAudioElement for soundPlayer tests
class MockAudioElement {
+2 -6
View File
@@ -270,9 +270,7 @@ describe("conversation history formatting", () => {
{ type: "user" as const, content: "How are you?" },
];
const relevantLines = lines.filter(
(line) => line.type === "user" || line.type === "assistant"
);
const relevantLines = lines.filter((line) => line.type === "user" || line.type === "assistant");
const history = relevantLines
.map((line) => {
@@ -289,9 +287,7 @@ describe("conversation history formatting", () => {
it("returns empty string for no messages", () => {
const lines: Array<{ type: string; content: string }> = [];
const relevantLines = lines.filter(
(line) => line.type === "user" || line.type === "assistant"
);
const relevantLines = lines.filter((line) => line.type === "user" || line.type === "assistant");
expect(relevantLines.length).toBe(0);
const history = relevantLines.length === 0 ? "" : "has content";
+1 -2
View File
@@ -264,8 +264,7 @@ describe("quickActionsStore", () => {
describe("quick action ID generation", () => {
it("generates unique custom action IDs", () => {
const generateId = () =>
`custom-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
const generateId = () => `custom-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
const id1 = generateId();
const id2 = generateId();
+2 -3
View File
@@ -289,8 +289,7 @@ describe("snippetsStore", () => {
describe("snippet ID generation", () => {
it("generates unique custom snippet IDs", () => {
const generateId = () =>
`custom-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
const generateId = () => `custom-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
const id1 = generateId();
const id2 = generateId();
@@ -335,7 +334,7 @@ git push`,
it("supports content with special characters", () => {
const snippet = {
content: 'echo "Hello, World!" && echo \'Single quotes\'',
content: "echo \"Hello, World!\" && echo 'Single quotes'",
};
expect(snippet.content).toContain('"');