-
Notifications
You must be signed in to change notification settings - Fork 161
👷 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 PerformancePending... 🧠 Memory PerformancePending... |
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage 🔗 Commit SHA: 35fd80d | Docs | Was this helpful? Give us feedback! |
servers: Servers, | ||
setup: string, | ||
remoteConfiguration?: RemoteConfiguration | ||
{ |
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.
Wouldn't an interface be more readable?
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.
I could definitely transform it to a type/interface.
createTest('service worker with worker logs - esm') | ||
.withWorker() | ||
.withLogs() | ||
.withWorker( |
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.
Would it be possible to move this to the createTest? So that we do something like:
.withWorker({ isModule: true, handleMessageWith: 'logger' })
Similar to what we do in:
.withExtension(createExtension(path.join(BASE_PATH, name)).withRum().withLogs()) |
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.
I think the idea is to avoid that scenario and be more generic, or that's what I understood from @bcaudan feedback.
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
withWorker
that automatically sets up the logs inside the worker. We can also pass an implementation, similar to what we do withwithLogs
andwithBody
.Test instructions
All e2e still passed.
Checklist