Skip to content

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Oct 6, 2025

  • Closes N/A

Additional details

Converts the @packages/launcher tests to vitest from mocha.

Snapshots

snapshots should mostly be 1:1 but the vitest snapshots do include the versionRegex. The findAppParams snapshot values in the windows snapshot are not present because we do not actually calculate these values in the code for windows. They look like they came from the MacOS detector at some point due to the values populated in the snapshot, all to say these are not expected to be carried over into the new snapshots.

Tests

A lot of the detector tests needed to be reworked as we can longer leverage withArgs or callsArgAsync, so many of the mocking around the child process leverages callback handlers that are defined in the test to get a specific outcome from the yielding process.

We no longer stub utils.getOutput or helper methods and instead mock the libraries they are consuming, such as 'child_process' or 'win-version-info' to more accurately test our implementation.

This tests the same functionality, except maybe slightly deeper, but overall the tests are the same

Implementation

Only thing that has really changed with the implementation is to always prioritize 64-bit browser installs over 32-bit. Before, the priority was mixed and this makes the prioritization consistent

Steps to test

How has the user experience changed?

PR Tasks


Note

Migrates @packages/launcher tests from Mocha to Vitest, updates Windows browser detection to prefer 64‑bit installs, and adjusts CI/browser setup accordingly.

  • Launcher:
    • Browser detection (Windows): Reorders search paths to prefer 64-bit installs; minor refactors (default fs import, direct getVersionString).
    • Tests: Replace Mocha/Chai/Sinon with Vitest; add Vitest snapshots/config; remove legacy Mocha files; update scripts/dependencies.
  • Docs:
    • cli/CHANGELOG.md: Notes browser detection now prefers 64-bit installs.
    • guides/esm-migration.md: Marks packages/launcher as completed.
  • CI:
    • Bumps CircleCI browser-tools orb and sets install_chrome replace_existing: true.
    • Updates expected Mocha result count (10 → 9).

Written by Cursor Bugbot for commit fcd1710. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

Copy link

cypress bot commented Oct 6, 2025

cypress    Run #66312

Run Properties:  status check failed Failed #66312  •  git commit fcd1710e96: remove duplicate entry
Project cypress
Branch Review chore/launcher_vitest
Run status status check failed Failed #66312
Run duration 20m 11s
Commit git commit fcd1710e96: remove duplicate entry
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 10
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26706
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.69%
  Untested elements 184  
  Tested elements 159  
Accessibility  97.97%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

Tests for review

Failed  cypress/e2e/studio/studio.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Cypress Studio > updates an existing test with assertions Test Replay Screenshots
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-inject-document-domain-chrome

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  commands/files.cy.js • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
src/cy/commands/files > #readFile > retries to read when ENOENT
    </td>
  </tr></table>
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
... > stops waiting when an xhr request is canceled
    </td>
  </tr></table>
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Screenshots

The first 5 flaky specs are shown, see all 10 specs in Cypress Cloud.

@AtofStryker AtofStryker force-pushed the chore/launcher_vitest branch from e4af658 to bc821e8 Compare October 6, 2025 14:51
@AtofStryker AtofStryker changed the title chore (DRAFT): convert @packages/launcher tests from mocha to vitest chore: convert @packages/launcher tests from mocha to vitest Oct 6, 2025
@AtofStryker AtofStryker self-assigned this Oct 6, 2025
cursor[bot]

This comment was marked as outdated.

@AtofStryker AtofStryker changed the title chore: convert @packages/launcher tests from mocha to vitest chore: convert @packages/launcher tests from mocha to vitest and always prefer 64-bit install paths to 32-bit Oct 8, 2025
@AtofStryker AtofStryker changed the title chore: convert @packages/launcher tests from mocha to vitest and always prefer 64-bit install paths to 32-bit misc: convert @packages/launcher tests from mocha to vitest and always prefer 64-bit install paths to 32-bit Oct 8, 2025
@AtofStryker AtofStryker force-pushed the chore/launcher_vitest branch from 1556e2f to 4441148 Compare October 8, 2025 14:35
@AtofStryker AtofStryker force-pushed the chore/launcher_vitest branch from 4441148 to 6c6389c Compare October 8, 2025 14:35
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

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.

1 participant