Skip to content

Commit

Permalink
test fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed May 10, 2024
1 parent 35e2756 commit 543684e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/components/chat_list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`))
Expand Down

0 comments on commit 543684e

Please sign in to comment.