Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add browser integration tests using Playwright #222

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

aron
Copy link
Contributor

@aron aron commented Mar 13, 2024

Currently just tests the streaming API on Chromium but it caught a bug with ReadableStream. I know we don't officially support the browser environments yet, but I do think we should ensure that it works if possible.

It's relatively simple to setup a CloudFlare worker, for example, that applies the API token + CORS headers to a browser request for example should someone want to do such a thing.

integration/browser/index.test.js Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
lib/stream.js Outdated Show resolved Hide resolved
@aron aron force-pushed the browser-integration branch 5 times, most recently from 4d5591d to 5c2fd05 Compare March 14, 2024 16:48
Browsers don't yet support async iteration of ReadableStream so we need to do this manually
@aron aron force-pushed the browser-integration branch 4 times, most recently from 35fc764 to 9949342 Compare March 18, 2024 13:52
@aron aron merged commit 9245a09 into main Mar 19, 2024
16 checks passed
@aron aron deleted the browser-integration branch March 19, 2024 05:20
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.

None yet

2 participants