Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugin-rsc/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use `examples/basic`, which contains comprehensive test scenarios, when the case

**Using `setupInlineFixture`**

Use `setupInlineFixture` with `examples/starter` for narrow configuration variants, invalid-input coverage, and cases where a standalone runnable example would add mostly boilerplate. Test projects are written under `examples/e2e/temp/`, with dependencies managed in `examples/e2e/package.json`. See `e2e/ssr-thenable.test.ts` for the pattern.
Use `setupInlineFixture` with `examples/starter-extra` for narrow configuration variants, invalid-input coverage, and cases where a standalone runnable example would add mostly boilerplate. Test projects are written under `examples/e2e/temp/`, with dependencies managed in `examples/e2e/package.json`. See `e2e/ssr-thenable.test.ts` for the pattern.

### Unit Tests

Expand Down
14 changes: 11 additions & 3 deletions packages/plugin-rsc/e2e/cloudflare.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { test } from '@playwright/test'
import { useFixture } from './fixture'
import { setupInlineFixture, useFixture } from './fixture'
import { defineStarterTest } from './starter'

// Run on a copy so the HMR tests never edit `examples/starter-extra`,
// which other specs copy as their inline fixture base.
const root = 'examples/e2e/temp/cloudflare'

test.beforeAll(async () => {
await setupInlineFixture({ src: 'examples/starter-extra', dest: root })
})

test.describe('dev-cloudflare', () => {
const f = useFixture({
root: 'examples/starter-extra',
root,
mode: 'dev',
command: 'pnpm cf:dev',
})
Expand All @@ -13,7 +21,7 @@ test.describe('dev-cloudflare', () => {

test.describe('build-cloudflare', () => {
const f = useFixture({
root: 'examples/starter-extra',
root,
mode: 'build',
buildCommand: 'pnpm cf:build',
command: 'pnpm cf:preview',
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-rsc/examples/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"private": true,
"type": "module",
"devDependencies": {
"@cloudflare/vite-plugin": "^1.62.5",
"@rolldown/plugin-babel": "^0.2.4",
"@vitejs/plugin-react": "latest",
"@vitejs/plugin-rsc": "latest",
"babel-plugin-react-compiler": "^1.0.0",
"connect": "^3.7.0",
"rsc-html-stream": "^0.0.8",
"sirv": "^3.0.2"
"sirv": "^3.0.2",
"wrangler": "^4.147.0"
}
}
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading