generated from nhcarrigan/template
chore: format
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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('"');
|
||||
|
||||
Reference in New Issue
Block a user