Code quality improvements and cleanup + Implemented ChatService
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled

This commit is contained in:
2026-04-05 15:19:55 +02:00
parent ec418ca7c9
commit 4a34d73c2f
20 changed files with 380 additions and 39 deletions

View File

@@ -0,0 +1,14 @@
import {describe, expect, it} from "vitest";
import {DatabaseMock} from "../src/mocks/storage/database";
import {ChatService} from "../src/services/chatService";
describe("ChatService Integration Testing", () => {
const CHAT_SERVICE_TESTING_USER_ID = "000000000000000000000000"
const CHAT_SERVICE_TESTING_TOKEN = "testingToken"
const service = new ChatService(CHAT_SERVICE_TESTING_USER_ID, CHAT_SERVICE_TESTING_TOKEN, new DatabaseMock(), () => {})
it('should get chats', async () => {
const chats = await service.get()
expect(chats[0].username).toBe("bob")
})
})