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
Copy file name to clipboardExpand all lines: README.md
-30Lines changed: 0 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,39 +57,9 @@ These scripts can help you to develop your app for Parse Server:
57
57
*`npm run lint` will check the linting of your cloud code, tests and `index.js`, as defined in `.eslintrc.json`.
58
58
*`npm run lint-fix` will attempt fix the linting of your cloud code, tests and `index.js`.
59
59
*`npm run prettier` will help improve the formatting and layout of your cloud code, tests and `index.js`, as defined in `.prettierrc`.
60
-
*`npm run test:e2e` will run any e2e tests that are written in `/e2e`.
61
-
*`npm run test:unit` will run any unit tests that are written in `tests`
62
60
*`npm test` will run all tests
63
61
*`npm run coverage` will run tests and check coverage. Output is available in the `/coverage` folder.
64
62
65
-
## Testing
66
-
67
-
Effective testing is crucial for maintaining the stability and reliability of your application. The testing pyramid is a widely adopted strategy to balance different types of tests and ensure a robust testing process.
68
-
69
-
### Testing Pyramid
70
-
The testing pyramid emphasizes the following layers:
71
-
72
-
1. Unit Tests:
73
-
- Focus on testing individual functions or components in isolation.
74
-
- Fast, reliable, and provide detailed feedback on specific parts of your code.
75
-
- Recommended to have a large amount of unit tests that test small units of code
76
-
- These tests should use mocks to simulate dependencies, eliminating the need for the entire system to be operational.
77
-
- Example: Testing a utility function or a cloud function independently.
78
-
- Command: `npm run test:unit`
79
-
80
-
2. Integration Tests:
81
-
- Validate that different modules or components work together correctly.
82
-
- Useful for testing database interactions, API endpoints, or cloud function workflows.
83
-
- Recommended to have a medium amount of integration tests that test the integration of units.
84
-
- Typically slower than unit tests but cover a broader scope.
85
-
86
-
3. End-to-End (E2E) Tests:
87
-
- Test the application as a whole, simulating real user interactions.
88
-
- Validate that the entire system works as expected, from the user interface to the backend.
89
-
- Recommmended to have a small amount of e2e tests.
90
-
- Example: Testing user login or data submission flows.
0 commit comments