Is there a way to reinitialize jQuery?
I'm trying to get some help on this stackoverflow question I wrote: https://stackoverflow.com/questions/77602661/is-there-a-way-to-reinitialize-jquery
To summarize: I'm using JSDOM to load my webapp and my webapp uses jQuery. JQuery holds onto references of the current global
PS: Is this question more suitable for #front-end ? IMO, it's kind of both.
To summarize: I'm using JSDOM to load my webapp and my webapp uses jQuery. JQuery holds onto references of the current global
window/window.document (this is an oversimplification and full details are in the question) once jquery is initialized. This prevents me from running tests that use different HTML and that is highly restrictive. I'm looking for a way to reinitialize jQuery in my test code so that I can use a different document per test. Is there a way to do this without modifying my production code that already import jQuery from 'jquery's?PS: Is this question more suitable for #front-end ? IMO, it's kind of both.
