Migrate browser testing from airtap to vitest + playwright#3
Conversation
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
|
@copilot Please try to run the tests in Chromium and fix all issues you see. |
…tiation test Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Fixed! Browser tests now run successfully in Chromium with 42/43 tests passing. Test Results: Issues Fixed:
All core WebRTC functionality tests are passing: basic connections, binary data, streams, trickle ICE, multistream, and negotiation. Commit: 35f61fb |
…dundant dep Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
|
@copilot Now running "npm run test" fails with this error:
You should probably move that file out of the test folder or adapt the file names (maybe *.test.ts?) and then rerun both Node and Browser tests. |
Co-authored-by: moufmouf <1290952+moufmouf@users.noreply.github.com>
Fixed! Added Both Node.js and browser tests now pass successfully: Node.js tests: Browser tests: Commit: 131efda |
* Migrate from airtap to vitest + playwright for browser testing * Add test screenshots to gitignore and remove them from git * Update CI workflow to keep browser testing optional * Fixing tests so they can run in both NodeJS and browsers * Run browser tests in CI * Upgrading to Node 20 (latest supported version)
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix
[X] New feature
[ ] Other, please explain:
What changes did you make? (Give an overview)
Replaced airtap with vitest + playwright for browser testing. The existing airtap setup was deprecated and required external services.
Removed:
.airtap.ymlconfigurationAdded:
vitest.browser.config.tswith chromium/firefox/webkit supporttest/setup-browser.ts- Browser test setup file that injects Node.js polyfills (Buffer, process) as globalsUpdated:
test-browser,test-browser-{chromium,firefox,webkit},test-browser-allprocess.onhandling for browser/Node.js compatibility.gitignore: exclude test screenshotsvitest.config.ts: excludetest/setup-browser.tsfrom Node.js test executionTest Results:
Node.js tests:
Browser tests (Chromium):
All core WebRTC functionality tests pass including basic connections, binary data transmission, streams, trickle ICE, multistream, and negotiation.
Usage:
Which issue (if any) does this pull request address?
Addresses browser testing modernization request.
Is there anything you'd like reviewers to focus on?
test/setup-browser.ts- Properly injects Buffer and process globals before tests run, solving browser compatibility issues. This file is excluded from Node.js test execution viavitest.config.ts.vitest.browser.config.ts- ensures browser compatibility--browser.nameCLI override despite single chromium instance in configOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.