File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments