Skip to content

Commit 6e80495

Browse files
committed
fix: avoid flaky timestamp comparison in messagesWithSystem test
1 parent 3b56d08 commit 6e80495

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/agent-runtime/src/util/__tests__/messages.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ describe('messagesWithSystem', () => {
3333

3434
const result = messagesWithSystem({ messages, system })
3535

36-
expect(result).toEqual([
37-
systemMessage('Be helpful'),
38-
userMessage('hello'),
39-
assistantMessage('hi'),
40-
])
36+
// Use the original message objects to avoid flaky sentAt timestamp comparisons
37+
expect(result).toEqual([systemMessage('Be helpful'), ...messages])
4138
})
4239
})
4340

0 commit comments

Comments
 (0)