I have a component which relies on refs and Scrollbooster (see below). When trying to mount the component with Enzyme I get an error saying:
at processImmediate (timers.js:658:5) ReferenceError: Element is not defined
at new t (/home/vikenfalk/third-party-client/tp-client/node_modules/scrollbooster/dist/webpack:/ScrollBooster/src/index.js:76:70)
If I log the reference that I'm passing to the Scrollbooster it looks fine and identical to what I can see when I run the actual application. The error seems to be related to JSDOM, but I'm wondering if anybody knows a way around this issue so that I can mount the component and test the calculations within the UseEffect function?
Hi!
I have a component which relies on refs and Scrollbooster (see below). When trying to mount the component with Enzyme I get an error saying:
If I log the reference that I'm passing to the Scrollbooster it looks fine and identical to what I can see when I run the actual application. The error seems to be related to JSDOM, but I'm wondering if anybody knows a way around this issue so that I can mount the component and test the calculations within the UseEffect function?