Skip to content

test: add entryName for each case#2413

Merged
upupming merged 1 commit intomainfrom
p/fix-test
Apr 1, 2026
Merged

test: add entryName for each case#2413
upupming merged 1 commit intomainfrom
p/fix-test

Conversation

@HuJean
Copy link
Copy Markdown
Collaborator

@HuJean HuJean commented Apr 1, 2026

Summary by CodeRabbit

  • Tests

    • Updated test configuration to support dynamic entry naming and flexible output path handling.
    • Improved test coverage for plugin configuration and bundle optimization scenarios.
  • Chores

    • Added changeset entry for release tracking.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@HuJean HuJean requested a review from upupming as a code owner April 1, 2026 09:27
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 0f31627

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

The pull request introduces parametrized entry names in rspeedy React plugin tests, replacing hard-coded main entries with computed keys and dynamically constructing output paths. A changeset marker file is also added. All changes are isolated to test files with no modifications to production code.

Changes

Cohort / File(s) Summary
Release Metadata
.changeset/better-wombats-sip.md
Added placeholder changeset entry file.
Test Configuration & Utilities
packages/rspeedy/plugin-react/test/config.test.ts, packages/rspeedy/plugin-react/test/optimizeBundleSize.test.ts
Introduced parametrized entryName variables in test cases, replacing hard-coded main entry keys with computed keys [entryName]. Updated expected output file paths to dynamically construct directories as .rspeedy/<entryName>/.... Set output.cleanDistPath: false to preserve prior dist output across test runs. Helper functions updated to accept and use entryName parameter for path construction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

framework:React

Suggested reviewers

  • upupming
  • luhc228

Poem

🐰 A rabbit hops through parametrized tests,
No more hard-coded 'main' for the best,
Dynamic entry names spring and play,
Cleaner dist paths brighten the day!
Configuration files, hopping with glee,

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding an entryName parameter for each test case across the test files to make entry points configurable.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch p/fix-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 1, 2026

Merging this PR will degrade performance by 14.6%

❌ 1 regressed benchmark
✅ 71 untouched benchmarks
⏩ 21 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 40.3 ms 47.2 ms -14.6%

Comparing p/fix-test (0f31627) with main (547a88b)

Open in CodSpeed

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 1, 2026

React Example

#7013 Bundle Size — 237.78KiB (0%).

0f31627(current) vs 547a88b main#6992(baseline)

Bundle metrics  no changes
                 Current
#7013
     Baseline
#6992
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 180 180
No change  Duplicate Modules 71 71
No change  Duplicate Code 46.4% 46.4%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7013
     Baseline
#6992
No change  IMG 145.76KiB 145.76KiB
No change  Other 92.02KiB 92.02KiB

Bundle analysis reportBranch p/fix-testProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 1, 2026

React MTF Example

#146 Bundle Size — 207.36KiB (0%).

0f31627(current) vs 547a88b main#125(baseline)

Bundle metrics  no changes
                 Current
#146
     Baseline
#125
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 174 174
No change  Duplicate Modules 68 68
No change  Duplicate Code 46.09% 46.09%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#146
     Baseline
#125
No change  IMG 111.23KiB 111.23KiB
No change  Other 96.13KiB 96.13KiB

Bundle analysis reportBranch p/fix-testProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 1, 2026

Web Explorer

#8589 Bundle Size — 728.84KiB (0%).

0f31627(current) vs 547a88b main#8568(baseline)

Bundle metrics  Change 1 change
                 Current
#8589
     Baseline
#8568
No change  Initial JS 43.31KiB 43.31KiB
No change  Initial CSS 2.16KiB 2.16KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 10 10
Change  Modules 150(+0.67%) 149
No change  Duplicate Modules 11 11
No change  Duplicate Code 34.68% 34.68%
No change  Packages 3 3
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8589
     Baseline
#8568
No change  Other 384.62KiB 384.62KiB
No change  JS 342.07KiB 342.07KiB
No change  CSS 2.16KiB 2.16KiB

Bundle analysis reportBranch p/fix-testProject dashboard


Generated by RelativeCIDocumentationReport issue

@upupming upupming merged commit a492dd6 into main Apr 1, 2026
50 of 51 checks passed
@upupming upupming deleted the p/fix-test branch April 1, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants