Skip to content

Commit 9eef83c

Browse files
authored
Update README.md
1 parent 5d1d895 commit 9eef83c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
### Simple React Native Typescript with Jest Testing Library
22

3+
##### What is a Test?
4+
* Code you write to verify the behavior of your application.
5+
* Tests are a specifications for hwo our code should work.
6+
* Verify that engineers are following best practices and conventions for your team.
7+
* We write tests because it allows us to ship quality code faster.
8+
9+
##### Types of Tests?
10+
* End-to-End: Spin up your app and simulate user behaviour. Kind of like a robot performing a task in your app.
11+
* Integration: Verify that multiple units work together.
12+
* Unit: Verify the functionality of a single function/component.
13+
* Static: Catch typos and errors while riting code.
14+
15+
##### A Jest Test
16+
```
17+
const expected = true;
18+
const actual = false;
19+
20+
test("it works", () => {
21+
expect(actual).toBe(expected);
22+
});
23+
```
24+
325
* npx react-native init MyApp --template react-native-template-typescript
426

527
* npm install --save @testing-library/react-native @testing-library/jest-native
628

729
* Official Docs - https://testing-library.com/docs/
830

9-
* npm run test --watch
31+
* npm run test --watch

0 commit comments

Comments
 (0)