ntoskrnl7

#55012: test: use vitest matchers in Widevine specs

Merged
Created: Oct 15, 2026, 10:04:33 AM
Merged: Oct 15, 2026, 12:26:18 PM
1 comments
Target: main

Description of Change

Fast follow-up to #50046.

The Widevine PR was last rebased before #54439 migrated the spec suite from Chai to Vitest. After #50046 was squash-merged onto the newer main, the main push failed lint and 10 cross-platform test jobs:

https://github.com/electron/electron/actions/runs/38750329980

Every Linux, Windows, macOS, and MAS test failure had the same cause: expect(...).to.be.false() is not a valid Vitest matcher. The aggregate GitHub Actions Completed job then failed as a consequence.

This converts all five remaining Widevine assertions to the equivalent Vitest matchers, fixing both the runtime test failure and the lint violations without changing test behavior.

Validation:

  • npm run lint
  • node script/yarn.js tsc -p tsconfig.spec.json

Checklist

Release Notes

Notes: none

Backports

No Backports Requested

This pull request doesn't have any backports requested or created for older release branches.

What are backports?

Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron