Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: nested index routes #606

Merged
merged 1 commit into from
Mar 18, 2025
Merged

Conversation

Anoesj
Copy link
Contributor

@Anoesj Anoesj commented Mar 18, 2025

Tests the output with the following structure:

  • a.vue
  • a/index.vue
  • a/[id].vue
  • a/[id]/index.vue

Copy link

pkg-pr-new bot commented Mar 18, 2025

Open in Stackblitz

npm i https://pkg.pr.new/unplugin-vue-router@606

commit: e3022cc

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.72%. Comparing base (cd4a3f8) to head (e3022cc).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #606   +/-   ##
=======================================
  Coverage   61.72%   61.72%           
=======================================
  Files          32       32           
  Lines        3135     3135           
  Branches      580      579    -1     
=======================================
  Hits         1935     1935           
  Misses       1194     1194           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Owner

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anoesj
Copy link
Contributor Author

Anoesj commented Mar 18, 2025

is this test really new? It seems similar to https://github.com/posva/unplugin-vue-router/pull/606/files#diff-57f60f5c6e2e4de08f37bfcc9c6a9634cc2545ab088cc2bb7399bc9ca6893edeL72

Almost. That test doesn't insert tree.insert('n/[a]', 'n/[a].vue'), although it does so for 'n/[a]/[b]'. But the added test specifically tests for UVR's behavior when you have both n/[a].vue and n/[a]/index.vue. We can merge the tests into one if you like, but the part this new test is testing isn't specifically related to params.

@posva posva merged commit 6952935 into posva:main Mar 18, 2025
13 checks passed
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