Open epfromer opened 4 years ago
Hi @epfromer ,
Thank you for your report. This package has no test implementation yet, and we've never run it combined with Jest before. Basically, it could be quite hard to find out what can be the general reason of these kind of problems.
Seems like FileSystem react-native-unimodules is mocked, and has no cacheDirectory?
The biggest problem is that I'm not able to find any information about using the mentioned package with Jest, and we do not know how it should be configured to access cacheDirectory
. I think would be better to ask about that on their repository.
One thing which comes to my mind for now it to set useCDN
flag to true
and let the wrapper fetch all required Highcharts scripts from the outside. Have you tried it?
Kind regards!
I have a Jest unit test throwing an error when testing the creation of a bar chart. The call stack is as follows:
I have traced it in the HighchartsReactNative.js file to setHcAssets(), calling this.setLayout(), calling this.getAssetAsString() and the following code:
Seems like FileSystem react-native-unimodules is mocked, and has no cacheDirectory?
I tried the following
But am now getting:
For the unit test, I'm using @testing-library/react-native.
Anyway, I thought you should know. If this is an error on my part, please advise.