Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Investigated all fixtures in __fixtures__/ to identify unused projects that can be removed. After merging with main branch (which removed esm-fragment-test-project and fragment-test-project in PR #551), this PR removes the remaining unused fixture.

Changes

  • Removed rsc-caching (376K) - zero references in code, tests, CI/CD, or rebuild scripts
  • Added __fixtures__/README.md documenting the 7 remaining fixtures, their purposes, CI/CD dependencies, and removal guidelines
  • Documented why example-todo-main-with-errors cannot be replaced with example-todo-main

Combined Results (with PR #551)

Total fixtures removed: 3

Total space saved: ~2.5MB

Analysis: example-todo-main-with-errors

This fixture cannot be replaced with example-todo-main because it contains unique error conditions that are specifically tested:

  1. SDL validation errors - 8 SDL files with intentional auth directive errors (missing directives, invalid roles, missing attributes, etc.)
  2. Duplicate routes - Identical route definitions in Routes.js for testing route conflict detection
  3. Unnamed QUERY - Cell without operation name for testing validation warnings
  4. Missing vite config - Tests path detection when vite is not configured
  5. JavaScript variant - Different from TypeScript-based example-todo-main

All 16 test references specifically rely on these error conditions that don't exist in example-todo-main.

Remaining Fixtures

All 7 remaining fixtures are actively used:

Core infrastructure (high usage):

  • test-project - primary test fixture, used extensively
  • example-todo-main - 56+ references across packages
  • example-todo-main-with-errors - 16 references for error testing (cannot be replaced)

CI/CD dependencies:

  • test-project-rsa - RSC smoke tests workflow
  • esm-test-project - ESM smoke tests workflow
  • test-project-rsc-kitchen-sink - RSC kitchen sink workflow

Specialized:

  • empty-project - minimal project path/config tests

Total: ~4.2MB across 7 fixtures

No further consolidation recommended - each serves a distinct testing purpose.

Original prompt

Please investigate if any project under fixtures can be removed

If it's only used in a few places, consider copying it closer to where it's used instead

Or, can perhaps one or more project be consolidated into just one, and we use that single project in more places instead

Or, maybe, instead of having one of the separate test projects, could we perhaps use a base test project, and then just make local/temporary changes to it to fit specific test cases?

fixtures/test-project is the main project most tests use, so please be very careful before suggesting any changes to that one.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 21, 2025
@netlify
Copy link

netlify bot commented Nov 21, 2025

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 0b9ea55
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6920929a2da24a0008949324

Copilot AI and others added 2 commits November 21, 2025 10:53
Co-authored-by: Tobbe <30793+Tobbe@users.noreply.github.com>
Co-authored-by: Tobbe <30793+Tobbe@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate removal or consolidation of fixtures Remove unused test fixtures: esm-fragment-test-project and rsc-caching Nov 21, 2025
Copilot AI requested a review from Tobbe November 21, 2025 10:57
Copilot finished work on behalf of Tobbe November 21, 2025 10:57
@Tobbe
Copy link
Member

Tobbe commented Nov 21, 2025

@copilot I've merged the latest changes from the main branch. Can you please re-run your analysis? Also, can any of the uses of example-todo-main-with-errors be changed to using example-todo-main instead? Or do they all test error states only available in the example-todo-main-with-errors project?

Co-authored-by: Tobbe <30793+Tobbe@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 21, 2025

@copilot I've merged the latest changes from the main branch. Can you please re-run your analysis? Also, can any of the uses of example-todo-main-with-errors be changed to using `example-todo-main...

Re-analysis complete after merging main (commit 0b9ea55).

Current state: After the merge, 3 fixtures have been removed total:

Regarding example-todo-main-with-errors: It cannot be replaced with example-todo-main. This fixture contains intentional errors that are specifically tested:

  1. SDL validation errors - 8 different SDL files with auth directive errors (missing directives, invalid roles, missing attributes, etc.)
  2. Duplicate routes - Two identical route definitions in Routes.js for testing route conflict detection
  3. Unnamed QUERY - Cell without a QUERY operation name to test validation warnings
  4. Missing vite config - Tests path detection when vite is not configured
  5. JavaScript vs TypeScript - Different language variant

All 16 test references specifically rely on these error conditions that don't exist in example-todo-main. Updated the README with detailed documentation of these unique features.

Copilot AI changed the title Remove unused test fixtures: esm-fragment-test-project and rsc-caching Remove unused test fixture: rsc-caching Nov 21, 2025
Copilot finished work on behalf of Tobbe November 21, 2025 16:27
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.

2 participants