I created some svg element and want to determine its size with
svgElement.getBoundingClientRect()
My code works if the svgElement is appended to the document with
document.body.appendChild(svgElement)
and if I run the code in the browser (google chrome).
However, while testing with nodejs and jest, the width and the height of the resulting bounding rect are always zero.
=>What can I do to correctly run the code with nodejs?
Aucun commentaire:
Enregistrer un commentaire