I am writing unit tests for my react website using jest running on node. My website uses the D3 diagramming library on some pages, so i load it dynamically using this functi