I'm trying to test a react component, and I seem to be hitting a JSDOM issue.
When I mount my component;
const component = mount(
<PipelineActions pipelineActions={value} {...actions} />
);
I get an error thrown;
document.body.createTextRange is not a function
I tried setting the dom directly via;
(global as any).document = jsdom.jsdom('');
(global as any).window = document.defaultView;
which had no effect. When I try to console.log(document.body)
I get something odd as well;
HTMLBodyElement {}
It seems like the DOM isn't getting built right, but I'm not sure why. Has anyone seen this before?