Closed mars-lan closed 3 years ago
Hmm - I wonder if it might be better as <rootDir>/node_modules/@notifee/react-native/jest-mock.js
- have you tried that @mars-lan ? Seems better because then it might work in a mono-repo where it was hoisted or similar, basically all the cases that caused the rootDir
variable to exist in jest config ?
@mikehardy thanks for the suggestion. <rootDir>
was indeed suggested by the doc: https://jestjs.io/docs/configuration#setupfilesafterenv-array
Thanks @mars-lan for this. Not going to merge this yet until we have a solid mock file with all the methods needed. I've updated the README to make sure no one tries to use it yet.
Thanks @mars-lan for your help. Will close this as I've merged a fix in with the updated jest mock.
Jest seems to expect this as without the leading
./
it leads to the following error