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

no Jest preset installed with 7.2.0 #719

Closed
githorse opened this issue Apr 22, 2021 · 1 comment
Closed

no Jest preset installed with 7.2.0 #719

githorse opened this issue Apr 22, 2021 · 1 comment

Comments

@githorse
Copy link

Describe the bug

After installing the package with yarn add -D @testing-library/react-native, and adding the custom Jest preset line in jest.config.js, I get this error:

yarn run v1.22.10
$ jest
● Validation Error:

  Module @testing-library/react-native should have "jest-preset.js" or "jest-preset.json" file at the root.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Sure enough, there's no jest-preset anything in node_modules/@testing-library/react-native:

$ ls -a node_modules/@testing-library/react-native
.
..
build
dont-cleanup-after-each.js
LICENSE
node_modules
package.json
pure.js
README.md
typings

Expected behavior

Jest preset should be available (even if maybe it doesn't fix the timer thing).

I've deleted node_modules and re-installed, no change. What am I doing wrong here?

Steps to Reproduce

$ yarn add -D @testing-library/react-native
$ yarn test

Versions

  npmPackages:
    @testing-library/react-native: ^7.2.0 => 7.2.0 
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0 
    react-test-renderer: 17.0.1 => 17.0.1 
@thymikee
Copy link
Member

Custom preset is only available since v8.0.0-rc.0.

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

2 participants