You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project uses Jest and React Testing Library for unit and component tests. Test files are colocated with their source files using the `.test.tsx` or `.test.ts` extension.
18
+
19
+
**Run all unit tests:**
20
+
```bash
21
+
npm test
22
+
```
23
+
24
+
**Run tests in watch mode (useful during development):**
25
+
```bash
26
+
npm run test:watch
27
+
```
28
+
29
+
**Run tests with coverage report:**
30
+
```bash
31
+
npm run test:coverage
32
+
```
33
+
34
+
The coverage report will be generated in the `coverage/` directory.
35
+
36
+
### End-to-End Tests
37
+
38
+
The project uses Playwright for end-to-end testing. E2E tests are located in the `e2e/` directory.
39
+
40
+
**Run E2E tests:**
41
+
```bash
42
+
npm run test:e2e
43
+
```
44
+
45
+
**Run E2E tests in headed mode (see the browser):**
46
+
```bash
47
+
npm run test:e2e:headed
48
+
```
49
+
50
+
**Run E2E tests for a specific browser:**
51
+
```bash
52
+
npx playwright test --project=chromium
53
+
npx playwright test --project=firefox
54
+
npx playwright test --project=webkit
55
+
```
56
+
57
+
**View E2E test report:**
58
+
```bash
59
+
npx playwright show-report
60
+
```
61
+
62
+
**Install Playwright browsers (first time setup):**
63
+
```bash
64
+
npx playwright install
65
+
```
66
+
67
+
### Writing Tests
68
+
69
+
**Unit Tests:**
70
+
- Place test files next to the source file: `Component.tsx` → `Component.test.tsx`
0 commit comments