Skip to content

chore(deps): bump vitest to v4 and fix tests#1564

Open
jescalada wants to merge 12 commits into
mainfrom
vitest-4-bump-and-test-fixes
Open

chore(deps): bump vitest to v4 and fix tests#1564
jescalada wants to merge 12 commits into
mainfrom
vitest-4-bump-and-test-fixes

Conversation

@jescalada

@jescalada jescalada commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Description

Bumps Vitest to v4 and fixes resulting failing tests from syntax changes.

Despite adding the uiPort mocks to fix some EADDRINUSE errors when running tests in parallel, I decided to keep the sequential tests (by disabling the fileParallelism option, formerly poolOptions.forks.singleFork).

This is because a few tests still fail when running npm run test-shuffle, and the MongoDB integration tests also fail on the CI when enabling parallelism. I made an issue to track this so we can benefit from parallel test execution speedup: #1565

Checklist

General

Tests

  • Tests have been added/updated for new functionality
  • Unit tests pass (npm test)
  • Linting and formatting pass (npm run lint and npm run format:check)
  • Type checks pass (npm run check-types)

@netlify

netlify Bot commented Jun 6, 2026

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit f4015dc
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6a573c7fb412540008c8cfe3

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Dependency Review

The following issues were found:

  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
  • ⚠️ 1 packages with OpenSSF Scorecard issues.

View full job summary

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.09%. Comparing base (096a049) to head (f4015dc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1564      +/-   ##
==========================================
- Coverage   85.75%   84.09%   -1.67%     
==========================================
  Files          85       81       -4     
  Lines        8448     4891    -3557     
  Branches     1457      843     -614     
==========================================
- Hits         7245     4113    -3132     
+ Misses       1172      555     -617     
- Partials       31      223     +192     

☔ View full report in Codecov by Harness.
📢 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.

@jescalada jescalada marked this pull request as ready for review June 6, 2026 07:48
@jescalada jescalada requested a review from a team as a code owner June 6, 2026 07:48
@jescalada

Copy link
Copy Markdown
Contributor Author

The dependency review is complaining on npm/yauzl v3 which apparently does have an MIT license: https://www.npmjs.com/package/yauzl

This is a known issue with Dependency Review not falling back to the GH license fetch API when the dependency graph API doesn't fetch as intended: actions/dependency-review-action#704

@kriswest kriswest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Needs conflicts resolved then good to go. One question (out of curiosity)

reviewer: {
username: string;
email: string;
gitAccount?: string; // Legacy field for GitHub usernames

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what prompted this coming back?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I added that again because of the following error on npm run check-types:

image

This is being used by the frontend to render legacy GitHub-only usernames:

<>
  {isGitHub && (
    <UserLink username={push.attestation.reviewer.username}>
      <img
        style={{ width: '45px', borderRadius: '20px' }}
        src={`https://github.com/${push.attestation.reviewer.gitAccount}.png`}
      />
    </UserLink>
  )}
  <div>
    <p>
      {isGitHub && (
        <UserLink username={push.attestation.reviewer.username}>
          {push.attestation.reviewer.gitAccount}
        </UserLink>
      )}
      {!isGitHub && <UserLink username={push.attestation.reviewer.username} />} approved
      this contribution
    </p>
  </div>
</>

This type error can still be viewed on main when running npm run check-types. The CI executes on the server-side only, hence why we didn't see this before: npm run check-types:server

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