Goal
I'd like to mock the requests for tiles made by MapboxGL using Pretender.
Problem
Pretender doesn't intercept those requests
What I've discovered
I think MapboxGL uses service workers. I'm not sure because I can't see them in the Chrome inspector, even on production sites. When I log the XMLHttpRequest global — which PretenderJS is responsible for replacing with a FakeRequest object — it always appears to be the native code.
I think this has to do with how the service worker scope works. It seems like its own fetch interface isn't being replaced by Pretender.