Skip to content

Commit 1b438a3

Browse files
committed
upate
1 parent 647f119 commit 1b438a3

File tree

1 file changed

+7
-7
lines changed
  • challenges/ecosystem

1 file changed

+7
-7
lines changed

challenges/ecosystem/05.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You need to `render` the component you want to test with `props` declaration.
5353
import { render } from "@testing-library/react-native";
5454
import React from "react";
5555

56-
import { Header } from "@/components/Header";
56+
import { Header } from "./Header";
5757

5858
describe("Header", () => {
5959
it("renders correctly", () => {
@@ -73,7 +73,7 @@ The first time you can use `debug()` to print rendered component.
7373
import { render, screen } from "@testing-library/react-native";
7474
import React from "react";
7575

76-
import { Header } from "@/components/Header";
76+
import { Header } from "./Header";
7777

7878
describe("Header", () => {
7979
it("renders correctly", () => {
@@ -94,7 +94,7 @@ describe("Header", () => {
9494
import { render, screen } from "@testing-library/react-native";
9595
import React from "react";
9696

97-
import { Header } from "@/components/Header";
97+
import { Header } from "./Header";
9898

9999
describe("Header", () => {
100100
it("renders correctly", () => {
@@ -105,7 +105,7 @@ describe("Header", () => {
105105
});
106106
```
107107

108-
Check if your test are passing with `npm run test`.
108+
When you run your `test` command, you will see green boxes if everything works!
109109

110110
![Run yarn test for React Native Automated testing](https://raw.githubusercontent.com/flexbox/react-native-workshop/main/challenges/ecosystem/yarn-test.gif)
111111

@@ -119,7 +119,7 @@ Check if your test are passing with `npm run test`.
119119
npx expo install -- --save-dev jest-expo jest
120120
```
121121

122-
Update `package.json` with a new script to run Jest
122+
- [ ] Update `package.json` with a new script to run Jest
123123

124124
```diff
125125
"scripts": {
@@ -135,7 +135,7 @@ Update `package.json` with a new script to run Jest
135135
++ },
136136
```
137137

138-
Double check if Jest is working properly from the terminal.
138+
### Double check Jest setup
139139

140140
- [ ] Create a new file called `hello.test.ts` and paste this working test
141141

@@ -220,6 +220,6 @@ Now you can run `npm run test:watch` to watch your files and run tests automatic
220220

221221
- [ ] Check the [React Native Testing Library Cookbook](https://callstack.github.io/react-native-testing-library/cookbook/index) and add a new test to your component.
222222

223-
### Improve your ESLint setup
223+
#### Improve your ESLint setup
224224

225225
- [ ] Install [eslint-plugin-testing-library](https://callstack.github.io/react-native-testing-library/docs/start/quick-start#eslint-plugin)

0 commit comments

Comments
 (0)