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 support for testing in more worker types #3804

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

daxpedda
Copy link
Collaborator

This adds support for testing in shared and service worker as a follow up to #3340.
Notably I deprecated run_in_worker in favor of run_in_dedicated_worker and introduced run_in_shared_worker and run_in_service_worker.

Keep in mind that Firefox doesn't support import nor importScript in service workers, so this has to be tested on Chrome. See the Bugzilla bug report.

I also reverted parts of #3351 that added some now outdated workarounds for Firefox lacking module support in workers.

Copy link
Collaborator

@Liamolucko Liamolucko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about shared/service workers so I can't review this super thoroughly, but it seems reasonable to me. I just left a couple nitpicks.

crates/test/src/lib.rs Outdated Show resolved Hide resolved
crates/cli/src/bin/wasm-bindgen-test-runner/server.rs Outdated Show resolved Hide resolved
@daxpedda daxpedda merged commit 0979fea into rustwasm:main Jan 23, 2024
25 checks passed
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