-
Notifications
You must be signed in to change notification settings - Fork 166
👷 change e2e implementation for workers #3901
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
base: main
Are you sure you want to change the base?
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage 🔗 Commit SHA: cd0c132 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
0feb678 to
a5b8ded
Compare
9afa674 to
3be6403
Compare
3d6c391 to
4a69138
Compare
test/e2e/lib/framework/createTest.ts
Outdated
| navigator.serviceWorker.register('/sw.js', ${JSON.stringify(options)}).then((registration) => { | ||
| window.myServiceWorker = registration | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: if we don't plan to use interactWithWorker in the coming tests, we could remove it and the window.myServiceWorker reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, I kept the window.myServiceWorker to avoid double registering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can this happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone executing withWorker multiple times.
4a69138 to
762681a
Compare
10587ae to
1ea0c00
Compare
1ea0c00 to
cd0c132
Compare
Motivation
The initial implementation of Worker E2E tests was somewhat tied to our specific use case and will not scale if we need to test different scenarios within the Worker environment.
Changes
It introduces a version of
withWorkerthat automatically sets up the logs inside the worker. We can also pass an implementation, similar to what we do withwithLogsandwithBody.Test instructions
All e2e still passed.
Checklist