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: website/src/pages/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1110,7 +1110,7 @@ Automated test comes with benefits that helps us write better code and makes it
1110
1110
- Arrange - Setup preconditions or the initial state necessary for the test case. Create necessary objects and define input values.
1111
1111
- Act - Perform the action you want to unit test (invoke a method, triggering an event etc.). **Strive for minimal number of actions**.
1112
1112
- Assert - Validate the outcome against expectations. **Strive for minimal number of asserts**.
1113
-
A rule "unit tests should fail for exactly one reason" doesn't need to apply always, but it can indicate a code smell if there are tests with many asserts in codebase.
1113
+
A rule "unit tests should fail for exactly one reason" doesn't need to apply always, but it can indicate a code smell if there are tests with many asserts in a codebase.
1114
1114
- As mentioned in [function conventions](#functions) try to keep them pure, and impure one small and focused.
1115
1115
It makes them easy to test, by passing args and observing return values, since we will **rarely need to mock dependencies**.
1116
1116
- Strive to write tests in a way your app is used by a user, meaning test business logic.
0 commit comments