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
docs(plugin-rsc): reorder test patterns to prioritize examples/basic
- Put examples/basic first as it's "mainly used for e2e testing" per README
- Position setupInlineFixture as option for specific edge cases
- Better align guide with actual project structure and usage patterns
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: packages/plugin-rsc/CONTRIBUTING.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,31 +10,32 @@ 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/starter.test.ts` for examples using `useFixture` with existing example projects.
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
14
15
15
**2. Creating isolated fixtures:** See `e2e/basic.test.ts` for examples using `setupIsolatedFixture` for tests that need to modify files.
16
16
17
-
**3. Creating inline fixtures (recommended for new tests):** See `e2e/ssr-thenable.test.ts` for examples using `setupInlineFixture` to create test-specific variations.
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
18
19
19
The new test structure uses:
20
20
21
21
-`examples/e2e/temp/` as base directory for test projects
22
22
-`setupInlineFixture` utility for creating test environments
23
-
-`examples/starter` as the lightweight base template (faster than `examples/basic`)
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
24
25
- Each test project is runnable locally
25
26
26
27
### Adding New Test Cases
27
28
28
-
**Option 1: Using `setupInlineFixture` (Recommended)**
29
-
Best for testing specific features or edge cases. See `e2e/ssr-thenable.test.ts` for the pattern.
30
-
31
-
**Option 2: Expanding `examples/basic`**
32
-
Best for comprehensive features that should be part of the main test suite:
29
+
**Option 1: Expanding `examples/basic` (Recommended for comprehensive features)**
30
+
Best for features that should be part of the main test suite. `examples/basic` is mainly used for e2e testing:
33
31
34
32
1. Add your test case files to `examples/basic/src/routes/`
35
33
2. Update the routing in `examples/basic/src/routes/root.tsx`
36
34
3. Add corresponding tests in `e2e/basic.test.ts`
37
35
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