Skip to content

Keep browser and stream tests compatible with Node20 - #716

Draft
kamilio wants to merge 1 commit into
mainfrom
codex/node20-test-compat
Draft

Keep browser and stream tests compatible with Node20#716
kamilio wants to merge 1 commit into
mainfrom
codex/node20-test-compat

Conversation

@kamilio

@kamilio kamilio commented Sep 10, 2026

Copy link
Copy Markdown
Member

The playground tests load the real browser engine in Node processes and Worker fixtures, where Node20 lacks navigator.language. The stream lifecycle tests also call Array.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:

  • Node20.20.0: four browser test files passed, 134 tests total; stream lifecycle tests passed 5/5.
  • Maintained playground build passed. Guarded repository lint passed with 10,571 files, zero errors/warnings, and 25 boundary receipts.

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant