Skip to content

Commit 7c4faf8

Browse files
authored
Merge pull request #3142 from codecrafters-io/pk-branch-4
docs: clarify test writing guidelines in formatting rules
2 parents 74228ed + 98ce9b6 commit 7c4faf8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.cursor/rules/formatting-test-files.mdc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ module('Acceptance | concepts-test', function (hooks) {
4949

5050
- Use `test` function for individual test cases
5151
- Test names should be descriptive and written in present tense
52-
- Use `async` keyword for test functions when needed
52+
- Always use `async` keyword for test functions when needed
53+
- Always start with `testScenario(this.server);`
54+
- Always sign in (use any of the signIn functions from `codecrafters-frontend/tests/support/authentication-helpers`) if the test requires a user to be logged in.
5355
- Structure tests with clear Arrange-Act-Assert pattern
5456

5557
Example:

0 commit comments

Comments
 (0)