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: packages/plugin-rsc/CONTRIBUTING.md
+21-51Lines changed: 21 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,82 +10,52 @@ The e2e testing uses a scalable approach inspired by React Router's integration
10
10
11
11
#### Test Fixture Patterns
12
12
13
-
**1. Using existing examples directly:** See `e2e/basic.test.ts` and `e2e/starter.test.ts` for examples using `useFixture` with existing example projects.
14
-
15
-
**2. Creating isolated fixtures:** See `e2e/basic.test.ts` for examples using `setupIsolatedFixture` for tests that need to modify files.
16
-
17
-
**3. Creating inline fixtures (for specific edge cases):** See `e2e/ssr-thenable.test.ts` for examples using `setupInlineFixture` to create test-specific variations.
18
-
19
-
The new test structure uses:
20
-
13
+
-`examples/basic` as the comprehensive test suite for the RSC plugin
14
+
-`examples/starter` as the lightweight base template for writing more targeted tests using `setupInlineFixture` utility
21
15
-`examples/e2e/temp/` as base directory for test projects
22
-
-`setupInlineFixture` utility for creating test environments
23
-
-`examples/basic` as the comprehensive base (mainly used for e2e testing, includes various advanced RSC usages)
24
-
-`examples/starter` as the lightweight base template for simple tests
25
-
- Each test project is runnable locally
26
16
27
17
### Adding New Test Cases
28
18
29
-
**Option 1: Expanding `examples/basic` (Recommended for comprehensive features)**
19
+
**Option 1: Using `setupInlineFixture` (Recommended for specific use cases)**
20
+
Best for testing specific use cases. See `e2e/ssr-thenable.test.ts` for the pattern.
21
+
22
+
**Option 2: Expanding `examples/basic` (Recommended for comprehensive features)**
30
23
Best for features that should be part of the main test suite. `examples/basic` is mainly used for e2e testing:
31
24
32
25
1. Add your test case files to `examples/basic/src/routes/`
33
26
2. Update the routing in `examples/basic/src/routes/root.tsx`
34
27
3. Add corresponding tests in `e2e/basic.test.ts`
35
28
36
-
**Option 2: Using `setupInlineFixture` (Recommended for specific edge cases)**
37
-
Best for testing specific features or edge cases. See `e2e/ssr-thenable.test.ts` for the pattern.
0 commit comments