partytown
partytown copied to clipboard
fix: Avoids converting a gif into a function
Summary
Fixes an issue where partytown prints an error when a third party scripts requests a resource different from a script.
Closes #245
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
partytown | ✅ Ready (Inspect) | Visit Preview | Aug 29, 2022 at 7:29PM (UTC) |
Open for ideas about how to test that since the expected behaviour is that a gif is requested with no other side effects. Is there a way to verify that using playwright? :sweat_smile:
Also, the integration that made us find that error was Google Adsense but that should happen everytime a script inside partytown requests something other than other script. Considering that, is it acceptable to make a test simulating that behaviour instead of trying to replicate using Google Adsense?
This looks like a good fix, but what you also be able to add some tests to this to ensure it continues to work, and isn't breaking other tests?
Finished the fixes and added end to end test @adamdbradley
This is great, thanks so much for fixing this up!