Skip to content

test: abbreviate integration to int, rename vitest config files #1018

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matejchalk
Copy link
Collaborator

@matejchalk matejchalk commented Jun 27, 2025

Motivation

  • I find it quite cumbersome to type out integration-test repeatedly, abbreviating to int-test would be more convenient.
  • The vite.config.{type}.ts file pattern doesn't realiably recognized by tooling because of the custom suffixes. Also, it may not be clear that the configuration is only for Vitest, not for Vite - vitest.config.ts naming is another standardized config file name, which would be more appropriate in our case.

Changes

  • Renamed *.integration.test.ts files to *.int.test.ts.
  • Renamed vite.config.{unit|integration|e2e}.ts files to vitest.{unit|int|e2e}.config.ts.
  • Replaced all references to changed files as needed.

Follow-up

For running E2E tests, typing out npx nx nxv-e2e <project>-e2e is cumbersome. I'd like to rename the nxv-e2e target to e2e-test. Then all our testing targets would have intuitive names - unit-test, int-test, e2e-test.

I've submitted a PR to @push-based/nx-verdaccio which adds an option to rename the inferred nxv-e2e target. Once that's released, we can rename the target on our end.

Copy link

github-actions bot commented Jun 27, 2025

Code PushUp

😟 Code PushUp report has regressed – compared current commit b7a003d with previous commit f0a2a01.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🟡 56 🟡 51 ↓ −5.1
Code coverage 🟢 91 🟢 90 ↓ −0.6
Security 🟡 61 🟡 61
Updates 🟡 77 🟡 77
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Type Safety 🟢 100 🟢 100
Bug prevention 🟢 100 🟢 100
Miscellaneous 🟢 100 🟢 100
Code style 🟢 100 🟢 100
Documentation 🔴 23 🔴 23
👎 2 groups regressed, 👎 7 audits regressed, 10 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🟡 56 🟡 51 ↓ −5.1
Code coverage Code coverage metrics 🟢 91 🟢 90 ↓ −0.6

19 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟨 5.1 s 🟨 5.8 s ↑ +14.5 %
Lighthouse Largest Contentful Paint 🟨 3.4 s 🟨 3.7 s ↑ +7.7 %
Lighthouse Total Blocking Time 🟥 1,660 ms 🟥 2,450 ms ↑ +47.4 %
Code coverage Line coverage 🟩 90.2 % 🟨 86.5 % ↓ −4.1 %
Lighthouse Time to Interactive 🟥 12.3 s 🟥 13.0 s ↑ +5.3 %
Lighthouse First Contentful Paint 🟥 3.0 s 🟥 3.1 s ↑ +0.8 %
Code coverage Branch coverage 🟨 86.3 % 🟨 85.7 % ↓ −0.7 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 1,901 KiB 🟩 Total size was 1,942 KiB ↑ +2.1 %
Lighthouse Minimizes main-thread work 🟥 10.3 s 🟥 13.0 s ↑ +26.1 %
Lighthouse JavaScript execution time 🟥 4.9 s 🟥 6.3 s ↑ +29 %
Lighthouse Max Potential First Input Delay 🟥 1,110 ms 🟥 1,790 ms ↑ +60.2 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +5.3 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↑ +0.1 %
Lighthouse Server Backend Latencies 🟩 110 ms 🟩 170 ms ↑ +62.8 %
Lighthouse Network Round Trip Times 🟩 30 ms 🟩 40 ms ↑ +35.3 %
Lighthouse Initial server response time was short 🟩 Root document took 420 ms 🟩 Root document took 410 ms ↓ −1.9 %
Lighthouse Cumulative Layout Shift 🟩 0 🟩 0 ↓ −100 %

587 other audits are unchanged.

@matejchalk matejchalk marked this pull request as ready for review June 27, 2025 12:13
@matejchalk matejchalk requested a review from BioPhoton as a code owner June 27, 2025 12:13
@matejchalk matejchalk requested review from vmasek and hanna-skryl June 27, 2025 12:13
Copy link
Collaborator

@vmasek vmasek left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, I experimented with similar changes in past as the DX was not good testing wise.
I'll try out if JB IDE picks it up now.

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