What do you mean mock XMLHttpRequest? Can you provide some more context? Like using this library npmjs.com/package/mock-xmlhttprequest for example?
Yes, that would be one option. Either that or something like PretenderJS does (github.com/pretenderjs/pretender/b...)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.