In this code, createRange is not working in Chrome. In IE it is working. Please help how to rectify in this. Is there any other property to work like create ran
createRange
As of March 31, 2020. This works for mocking JSDOM for jest unit tests
(window as any).global.document.createRange = () => { return { setEnd: () => {}, setStart: () => {}, getBoundingClientRect: () => {}, getClientRects: () => [] }; };