We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, .toHaveTextContent greets the developer with: Property 'toHaveTextContent' does not exist on type 'JestMatchers<ReactTestInstance>'.
.toHaveTextContent
Property 'toHaveTextContent' does not exist on type 'JestMatchers<ReactTestInstance>'.
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"]
types
"types": ["jest", "node", "@testing-library/jest-native"]
This way, the expo preset can be presented error free.
No response
npx create-nx-workspace@latest --preset=expo --appName=your-app-name
Node : 20.9.0 OS : darwin-arm64 npm : 10.1.0 nx (global) : 18.3.2 nx : 18.3.4 @nx/js : 18.3.4 @nx/jest : 18.3.4 @nx/linter : 18.3.4 @nx/eslint : 18.3.4 @nx/workspace : 18.3.4 @nx/detox : 18.3.4 @nx/devkit : 18.3.4 @nx/eslint-plugin : 18.3.4 @nx/expo : 18.3.4 @nx/react : 18.3.4 @nrwl/tao : 18.3.4 @nx/web : 18.3.4 @nx/webpack : 18.3.4 typescript : 5.4.5 --------------------------------------- Registered Plugins: @nx/expo/plugin @nx/eslint/plugin @nx/jest/plugin @nx/detox/plugin
1.22.19
The text was updated successfully, but these errors were encountered:
or you can fix it by adding the setup file:
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", "module": "commonjs", "types": ["jest", "node"] }, "files": ["./test-setup.ts"], // <-- points to test setup file "include": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.test.tsx", "src/**/*.spec.tsx", "src/**/*.test.js", "src/**/*.spec.js", "src/**/*.test.jsx", "src/**/*.spec.jsx", "src/**/*.d.ts" ] }
I will do a proper fix.
Sorry, something went wrong.
xiongemi
Successfully merging a pull request may close this issue.
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: