Skip to content
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

Error when I run unit test #101

Closed
oularrea opened this issue Dec 3, 2022 · 1 comment · Fixed by #102
Closed

Error when I run unit test #101

oularrea opened this issue Dec 3, 2022 · 1 comment · Fixed by #102
Assignees
Labels
🐛 bug Something isn't working

Comments

@oularrea
Copy link

oularrea commented Dec 3, 2022

Describe the bug
The package 'react-native-keyboard-controller' doesn't seem to be linked. Make sure

Code snippet
image

Repo for reproducing
I would be highly appreciate if you can provide repository for reproducing your issue. It can significantly reduce the time for discovering and fixing the problem.

Smartphone (please complete the following information):

  • Desktop OS: MacOS 13.0.1 (22A400)
  • Device: Testing with Jest
  • RN version: 0.70.5
  • Library version: 1.4.1
@oularrea oularrea added the 🐛 bug Something isn't working label Dec 3, 2022
@kirillzyusko
Copy link
Owner

Interesting 🤔
I thought unit tests should be running without any issues, since this library depends on modules, that are already mocked.
I will have a look on it now 👀

kirillzyusko added a commit that referenced this issue Dec 16, 2022
## 📜 Description

Will fix
#101

## 💡 Motivation and Context

Right now it's not possible to write jest tests for components, that are
using this library. To overcome the limitation I added `mock` and wrote
several test cases as examples.

## 📢 Changelog

### CI
- run `example` tests;

### Docs
- added section about testing;

### Jest
- added mocks;
- added example of tests;

## 🤔 How Has This Been Tested?

Tested locally and on CI that tests are working fine.

## 📝 Checklist

- [x] CI successfully passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants