Tests failing when using react-query-devtools
I am getting this error while I am trying to test a file where I am also using the
ReactQueryDevtools in the provider.
As I checked the dependency, the error (see attached ss) I am getting on this package is-what is from react-query-devtools package
I found a hack to resolve the issue by editing the node_modules/copy-anything/dist/index.js file to replace it's content with node_modules/copy-anything/dist/cjs/index.cjs file and same I have to do for the is-what package
by doing this I am no longer getting that error in the test file, but still I am trying to figure out the actual solution of it
Is anyone here faced some issues like this with react-query-devtools ?

1 Reply
afraid-scarletOP•3y ago
I ended up mocking
copy-anything module which fixed the issue