feat: add automocking in vitest
react-native-mmkv already has automocking for Jest, but not for Vitest.
This commit adds automocking for Vitest test environments just by checking if the VITEST_WORKER_ID environment variable is present.
This new functionality was also documented in the README, in the "Testing with Jest or Vitest" section, formerly the "Testing with Jest" section.
This way, MMKV will be mocked in both Jest and Vitest test environments.
Interesting, thanks for your PR!
Changes look good, but do people actually use Vitest in RN apps?
Changes look good, but do people actually use Vitest in RN apps?
This package was created to integrate React Native and Vitest, so I am using them together.
About the error during CI, this appears to be an error in the integration between Eslint and Prettier. I will fix this.
Oops! I'll see what went wrong and fix it.
Thank you!