fix(server/test): non-platform agnostic test

This commit is contained in:
Elian Doran 2025-07-30 08:42:51 +03:00
parent 5bc4bdaeef
commit 37a79aeeab
No known key found for this signature in database

View File

@ -55,7 +55,7 @@ describe('ChatStorageService', () => {
beforeEach(async () => {
vi.clearAllMocks();
chatStorageService = new ChatStorageService();
// Get mocked modules
mockNotes = (await import('../notes.js')).default;
mockSql = (await import('../sql.js')).default;
@ -177,7 +177,7 @@ describe('ChatStorageService', () => {
const result = await chatStorageService.createChat('');
expect(result.title).toContain('New Chat');
expect(result.title).toMatch(/\d{1,2}\/\d{1,2}\/\d{4}/); // Date pattern
expect(result.title).toMatch(/\d{4}/);
});
});
@ -622,4 +622,4 @@ describe('ChatStorageService', () => {
expect(toolExecutions[0].arguments).toEqual({ query: 'existing' });
});
});
});
});