Skip to content

Commit 4362ec5

Browse files
committed
Tidy testing mdc.
1 parent 13e119a commit 4362ec5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.cursor/rules/testing.mdc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ alwaysApply: true
1515
- Example: `it('does not load flags prior to start', async () => {/* test code */})`
1616
- Describe blocks should ONLY be used for common setup for a series of tests
1717
- Example: `describe('given a mock filesystem and memory feature store', { /* tests */})`
18+
- If there is no shared configuration, do not use a describe block
1819
- Combined test names should be understandable: `given a mock filesystem and memory feature store > it does not load flags prior to start`
1920

20-
## Running Tests
21-
- Tests should be run using `yarn workspace <package name> test`
22-
- The package name can be found in the package.json file
23-
- Unit tests should be run for any packages that have been modified
24-
25-
## Developing Tests
26-
- Describe blocks should only be used for shared test configuration
27-
- The describe block should describe the configuration being shared
28-
- If there is no shared configuration, do not use a describe block
2921
- Example of proper describe usage:
3022
```javascript
3123
describe('given a mock filesystem and memory feature store', () => {
@@ -51,3 +43,10 @@ alwaysApply: true
5143
// Test code
5244
});
5345
```
46+
47+
## Running Tests
48+
- Tests should be run using `yarn workspace <package name> test`
49+
- The package name can be found in the package.json file
50+
- Unit tests should be run for any packages that have been modified
51+
52+

0 commit comments

Comments
 (0)