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
utils/hello.test.ts
it("works", () => { expect(1).toBe(1); });
package.json
"test": "jest", "test:unit:watch": "jest --watch",
yarn test:unit
src/components/StarshipCard.test.tsx
yarn test:unit:watch
import React from "react"; import { render } from "testing-library"; import { StarshipCard } from "~/components/StarshipCard"; const shipFixture = { ... } describe("StarshipCard", () => { it("renders correctly", () => { const { getByText, debug } = render( <StarshipCard ship={shipFixture} /> ); debug() <----- just to test getByText("Star Destroyer"); getByText("150000000 credits"); }); });
Testing code using React Navigation takes some setup since we need to mock some native dependencies used in the navigators.
<NavigationContainer><Card /></NavigationContainer>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
utils/hello.test.ts
package.json
yarn test:unit
src/components/StarshipCard.test.tsx
yarn test:unit:watch
Updating Jest setup
Testing code using React Navigation takes some setup since we need to mock some native dependencies used in the navigators.
<NavigationContainer><Card /></NavigationContainer>
The text was updated successfully, but these errors were encountered: