Another paper cut - My app uses this pattern for AJAX interactions:
1 - If things work, cool
2 - If I get a known 4xx, handle it
3 - otherwise, reload the page
Testing that a custom element reloads the page using JSDOM seems currently impossible?
Unlike "regular" OO code, I could wrap this stuff in injectible interfaces. But since I don't control object construction for custom elements, I can't see a way to do that.