Keep browser and stream tests compatible with Node20 - #716
Draft
kamilio wants to merge 1 commit into
Draft
Conversation
Provide navigator.language in the Node-hosted browser bundle and Worker fixtures. Consume async stream results with for-await so Node20 executes the existing lifecycle, schema failure, and cleanup assertions. ### Tests Updated | Test group | Verifies | | --- | --- | | Real safe-bash browser kernel, execution, filesystem, and session cohorts | Actual browser engine and Worker behavior with explicit browser globals. | | defineStreamCommand SDK lifecycle | Lazy consumption, status separation, schema rejection, and exactly-once cleanup without Array.fromAsync. | Validation: Node20.20.0 passed all four browser files (134 tests) and the stream lifecycle file (5 tests). No production runtime or deadline changes.
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.
The playground tests load the real browser engine in Node processes and Worker fixtures, where Node20 lacks
navigator.language. The stream lifecycle tests also callArray.fromAsync, which is unavailable in Node20.Supply the browser locale in those test realms and collect stream values with
for await. The existing execution, cancellation, schema-error, and cleanup assertions remain in place.Validation:
This prerequisite addresses the browser import and stream API failures observed in #715 and the other active PRs. The separate replay-equivalence and tiny-MCP compiler test deadlines remain under investigation; this change does not alter their deadlines or assertions.