Skip to content

Commit f1c7c65

Browse files
hi-ogawaclaude
andcommitted
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]>
1 parent 90142a3 commit f1c7c65

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/plugin-rsc/CONTRIBUTING.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,32 @@ The e2e testing uses a scalable approach inspired by React Router's integration
1010

1111
#### Test Fixture Patterns
1212

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.
1414

1515
**2. Creating isolated fixtures:** See `e2e/basic.test.ts` for examples using `setupIsolatedFixture` for tests that need to modify files.
1616

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.
1818

1919
The new test structure uses:
2020

2121
- `examples/e2e/temp/` as base directory for test projects
2222
- `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
2425
- Each test project is runnable locally
2526

2627
### Adding New Test Cases
2728

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:
3331

3432
1. Add your test case files to `examples/basic/src/routes/`
3533
2. Update the routing in `examples/basic/src/routes/root.tsx`
3634
3. Add corresponding tests in `e2e/basic.test.ts`
3735

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.
38+
3839
### Running Tests
3940

4041
```bash

0 commit comments

Comments
 (0)