Skip to content

test(rsc): split starter tests into multiple files#629

Merged
hi-ogawa merged 7 commits intomainfrom
refactor/split-starter-tests
Jul 26, 2025
Merged

test(rsc): split starter tests into multiple files#629
hi-ogawa merged 7 commits intomainfrom
refactor/split-starter-tests

Conversation

@hi-ogawa
Copy link
Copy Markdown
Contributor

@hi-ogawa hi-ogawa commented Jul 26, 2025

Written by Cursor

  • Extract defineTest utility to starter.ts
  • Split tests into logical groups:
    • starter-basic.test.ts: Basic starter tests (dev/build for default and cloudflare)
    • starter-no-ssr.test.ts: No-SSR specific tests with build verification
    • starter-env.test.ts: Environment-specific tests (production/development modes)
    • starter-react-compiler.test.ts: React compiler integration tests
    • starter-base.test.ts: Base path configuration tests
    • starter-module-runner.test.ts: Module runner HMR configuration tests
    • starter-render-built-url.test.ts: renderBuiltUrl configuration tests

Benefits:

  • Tests can now run in parallel for faster CI execution
  • Better organization by functionality/configuration
  • Easier maintenance with focused test files
  • Maintains backward compatibility with original starter.test.ts

To run all starter tests:
pnpm test-e2e starter-basic starter-no-ssr starter-env starter-react-compiler starter-base starter-module-runner starter-render-built-url

Description

hi-ogawa added 2 commits July 26, 2025 17:04
- Extract defineTest utility to starter.ts
- Split tests into logical groups:
  - starter-basic.test.ts: Basic starter tests (dev/build for default and cloudflare)
  - starter-no-ssr.test.ts: No-SSR specific tests with build verification
  - starter-env.test.ts: Environment-specific tests (production/development modes)
  - starter-react-compiler.test.ts: React compiler integration tests
  - starter-base.test.ts: Base path configuration tests
  - starter-module-runner.test.ts: Module runner HMR configuration tests
  - starter-render-built-url.test.ts: renderBuiltUrl configuration tests

Benefits:
- Tests can now run in parallel for faster CI execution
- Better organization by functionality/configuration
- Easier maintenance with focused test files
- Maintains backward compatibility with original starter.test.ts

To run all starter tests:
pnpm test-e2e starter-basic starter-no-ssr starter-env starter-react-compiler starter-base starter-module-runner starter-render-built-url
- Remove unused starter.test.ts file
- Merge starter-basic.test.ts and starter-env.test.ts into basic.test.ts since they share the same fixture root (examples/starter)
- Remove 'starter-' prefix from all test files for cleaner naming:
  - starter-no-ssr.test.ts → no-ssr.test.ts
  - starter-react-compiler.test.ts → react-compiler.test.ts
  - starter-base.test.ts → base.test.ts
  - starter-module-runner.test.ts → module-runner.test.ts
  - starter-render-built-url.test.ts → render-built-url.test.ts

Now only truly independent test files (different fixture roots) are split, allowing for optimal parallelization while maintaining logical grouping.
@hi-ogawa hi-ogawa force-pushed the refactor/split-starter-tests branch from ea9fba6 to b65e9a6 Compare July 26, 2025 08:15
hi-ogawa added 5 commits July 26, 2025 17:18
- Restored the original basic.test.ts for examples/basic (comprehensive test suite)
- Created new starter.test.ts for examples/starter tests (lightweight template tests)
- Both files now work correctly and independently
@hi-ogawa hi-ogawa marked this pull request as ready for review July 26, 2025 08:42
@hi-ogawa hi-ogawa changed the title test(rsc): split tests into multiple files test(rsc): split starter tests into multiple files Jul 26, 2025
@hi-ogawa hi-ogawa merged commit 707f35b into main Jul 26, 2025
26 checks passed
@hi-ogawa hi-ogawa deleted the refactor/split-starter-tests branch July 26, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant