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
Default --preset=expo workspace .toHaveTextContent in App.spec.tsx contains a TypeScript error #23027
Closed
1 of 4 tasks
Labels
Comments
or you can fix it by adding the setup file:
I will do a proper fix. |
Thank you @xiongemi! Really appreciate it. |
xiongemi
added a commit
that referenced
this issue
May 17, 2024
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #23027 #22198
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
Currently,
.toHaveTextContent
greets the developer with:Property 'toHaveTextContent' does not exist on type 'JestMatchers<ReactTestInstance>'.
Expected Behavior
No TypeScript error.
To fix this, update tsconfig.spec.json
types
to include the appropriate types, like so:"types": ["jest", "node", "@testing-library/jest-native"]
This way, the expo preset can be presented error free.
GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest --preset=expo --appName=your-app-name
Nx Report
Failure Logs
No response
Package Manager Version
1.22.19
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: