From 543684e2e3de599acda751f454ecea8841cf4bde Mon Sep 17 00:00:00 2001 From: Nicolas Bonamy Date: Fri, 10 May 2024 11:48:40 -0500 Subject: [PATCH] test fix? --- tests/components/chat_list.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/chat_list.test.ts b/tests/components/chat_list.test.ts index 542656a..01a0179 100644 --- a/tests/components/chat_list.test.ts +++ b/tests/components/chat_list.test.ts @@ -32,12 +32,14 @@ beforeAll(() => { }) beforeEach(() => { + const now = new Date() + const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 1).getTime(); store.chats = [] for (let i = 0; i < 10; i++) { const chat = new Chat() chat.title = `Chat ${i}` chat.setEngineModel('mock', 'chat') - chat.lastModified = Date.now() - i * i/2 * 86400000 + chat.lastModified = todayStart - i * i/2 * 86400000 chat.messages.push(new Message('system', 'System Prompt')) chat.messages.push(new Message('user', `Question ${i}`)) chat.messages.push(new Message('assistant', `Subtitle ${i}`))