question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[5.0.0-rc.5] Jest failures

See original GitHub issue

Current behaviour

There appears to be an issue with Jest tests when upgrading from version 4.12.4 to 5.0.0-rc.5.

Expected behaviour

Upgrading the version of react-native-paper shouldn’t affect Jest tests.

Code sample

https://github.com/iM-GeeKy/material-you-jest

Check the README.md on how to reproduce.

What have you tried

I was able to identify that upgrading the version seems to have an effect on the outcome of the Jest test. Directions are in the README.md.

Your Environment

software version
ios or android
react-native 0.69.5
react-native-paper 5.0.0-rc.5
node v16.16.0
npm or yarn yarn v1.22.19
expo sdk 46.0.10

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lukewalczakcommented, Sep 20, 2022

I see now! Thank you. Is that captured in the documentation by any chance? That way it’s more obvious for anyone else who may run into the same problem.

Tbh, I’m going to revisit that change and confirm it’s necessary. If I confirm it’s required then I will add it in the migration guide, otherwise will revert that change and inform you about it ✌🏽

0reactions
lukewalczakcommented, Oct 10, 2022

@iM-GeeKy @Duduzera1997 there is a PR which should handle the issue with tests https://github.com/callstack/react-native-paper/pull/3405

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest test suite fails with message "self is not defined"
I was using the wrong test environment, the solution was this line: jest.config.js testEnvironment: "jsdom".
Read more >
jest - npm
Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed ...
Read more >
Jest test - CodeSandbox
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >
Getting all files containing a failed test from a jest run
The following approach is _one way_ to get a list of file names with failed tests after all. You can run jest such...
Read more >
Jest fails as part of npm build - Visual Studio Feedback
The same exact build definition completed fine against the same branch 5 days ago: 2018-07-28T05:21:21.1000472Z FAIL src/<filepath>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found