Skip to content

Setting up Jest mock does not work #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zeljkoX opened this issue Apr 8, 2019 · 2 comments
Closed

Setting up Jest mock does not work #62

zeljkoX opened this issue Apr 8, 2019 · 2 comments

Comments

@zeljkoX
Copy link

zeljkoX commented Apr 8, 2019

Current behavior

Following docs in order to setup jest mock end up in error.

`import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock';
' does not work as a file cannot be found.

After inspecting node_modules/@react-native-community/async-storage I have found out that there is nojest folder, only lib folder

as

Environment

  • Async Storage version: 1.2.4
  • React-Native version: 0.59.2
  • Platform tested:iOS/Android

info
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 422.65 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.13.0 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 21, 23, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.2, 27.0.3, 28.0.2, 28.0.3
System Images: android-25 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5014246
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.3 => 0.59.3
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

@nirre7
Copy link

nirre7 commented Apr 9, 2019

I thought the same thing since the docs where updated ...
I think they are working on it

@krizzu
Copy link
Member

krizzu commented Apr 9, 2019

Hey @nirre7, @zeljkoX

Version with Jest is not yet published, I'm going publish later today.

Closing this down for now.

thanks.

@krizzu krizzu closed this as completed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants