Commit 8354e2a
test: add comprehensive unit tests for TriggerChatTransport
Tests cover:
- Constructor with required and optional options
- sendMessages triggering task and returning UIMessageChunk stream
- Correct payload structure sent to trigger API
- Custom streamKey in stream URL
- Extra headers propagation
- reconnectToStream with existing and non-existing sessions
- createChatTransport factory function
- Error handling for API failures
- regenerate-message trigger type
Co-authored-by: Eric Allam <eric@trigger.dev>1 parent 741c983 commit 8354e2a
2 files changed
+553
-0
lines changed
0 commit comments