You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6134386
Browse filesBrowse the repository at this point in the historyBrowse files
// Compare the raw serialized bytes, not parsed objects: `toEqual` ignores key
120
+
// insertion order, so a transform that reorders request keys would pass while
121
+
// the bytes on the wire changed. The expected strings are literals for the
122
+
// same reason: building them from the same helper would re-derive the order.
123
+
expect(JSON.stringify(anthropicMessages)).toBe(
124
+
'[{"role":"system","content":[{"type":"text","text":"You are a helpful assistant.","cache_control":{"type":"ephemeral"}}]},{"role":"user","content":[{"type":"text","text":"First message","cache_control":{"type":"ephemeral"}}]},{"role":"assistant","content":"First response"},{"role":"user","content":[{"type":"text","text":"Second message","cache_control":{"type":"ephemeral"}}]}]',
'[{"role":"system","content":"You are a helpful assistant.","cache_control":{"type":"ephemeral"}},{"role":"user","content":[{"type":"text","text":"First message","cache_control":{"type":"ephemeral"}}]},{"role":"assistant","content":"First response"},{"role":"user","content":[{"type":"text","text":"Second message","cache_control":{"type":"ephemeral"}}]}]',
0 commit comments