Conversation
✅ Deploy Preview for mcp-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
16e8f03 to
831d272
Compare
831d272 to
5503622
Compare
This commit introduces a new test suite for the streamText function, verifying that it correctly emits a stream_done event when the stream ends. Additionally, a utility function, iterableFromArray, is added to facilitate the creation of async iterables for testing purposes.
nickytonline
commented
Jul 11, 2025
| }) | ||
| }) | ||
|
|
||
| describe('streamText', () => { |
Member
Author
There was a problem hiding this comment.
checking to see that our streamed response always returns a t:{"type":"stream_done"}. We can't add a test for a streamed response that times out as a unit test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now if a request times out, the user receives an error message indicating that it might be Pomerium timing out the request.
Note that I set my timeout for the route to five seconds so I could see it error out which is why the error appears that quickly in the GIF.
Testing
Set your chat app route to a low timeout, e.g. 5 seconds like I did. Use a tool like the web search tool. See it timeout after 5 seconds and render the error message.
Closes #127