-
Notifications
You must be signed in to change notification settings - Fork 158
Description
I use PretenderJS (via Ember Mirage) to help test dozens of apps. In most cases, it intercepts network requests perfectly.
However, I also use another 3rd party library (MapboxGL) which issues XMLHttpRequests from within Web Workers. This is a problem because I do not have direct control of their global objects.
Because most of my functionality is built on top of this 3rd party library, being able to test it would greatly improve my test coverage.
(For additional context, this SO question explains my situation exactly. The answer to it suggests a way to intercept these requests using Service Workers.)
I couldn't find another issue related to this, but I'm curious what others think. It seems like Service Workers would help us intercept fetch requests at another level. I'd love to dig into the code if there's an appetite for it, but I could also just be completely off base!