Code quality improvements and cleanup + Implemented ChatService
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
This commit is contained in:
14
tests/chatsService.test.ts
Normal file
14
tests/chatsService.test.ts
Normal 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")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user