plotly.js
plotly.js copied to clipboard
How to mock randstr for snapshots
Wondering how I can use jest snapshots while plotly is using its own randstr function (i.e. there's nothing to mock out)
I don't know of a way, unless you've included plotly.js from source in which case you should be able to directly import plotly.js/src/lib
and replace Lib.randstr
with whatever you want. Anyway the function is defined here, we'd be happy to accept a PR to make it easily mockable.