MarshallOfSound

#54261: test: prepare the spec suite for a parallel runner

Merged
Created: Sep 23, 2026, 7:07:45 PM
Merged: Sep 24, 2026, 1:55:24 AM
10 comments
Target: main

Description of Change

Groundwork for running the spec files across several Electron processes at once (the vitest runner itself follows separately). Everything here runs under the current mocha runner; one commit per change.

  • BrowserWindow spec groups that were declared with it() but only wrap other it() calls become describe(); the inner tests never ran (two macOS expectations they contained are updated or skipped with a FIXME, see the commit).
  • this.retries(n) moves from inside test bodies up to the suite.
  • runCleanupFunctions() runs every defer()-ed cleanup even when one throws, instead of leaving the stale one to throw again after every later test.
  • closeWindow() only reaps windows that existed when it was called, never the next test's window.
  • The WebContentsView reuse spec compares webContents sets instead of a GC-sensitive count.
  • The document.visibilityState specs listen on the window's own webContents.ipc instead of ipcMain, so a late message from the previous test's page is not mistaken for the new window's.
  • The BrowserWindow.focus() spec waits for the window to take focus before calling blur().
  • The utilityProcess heap snapshot spec gets 60 s instead of 30.
  • The powerMonitor specs clear the logind mock's call log first, so they only count their own process's Inhibit calls.
  • describe/it accept an options object between title and body, (title, { timeout, retry, tags }, fn).
  • Suites that need OS focus, the clipboard, screen capture, global shortcuts, real mouse input, the D-Bus mocks or Squirrel.Mac's shared cache are tagged { tags: ['serial'] } (a no-op for mocha).

Checklist

Release Notes

Notes: none

Backports

42-x-y
Merged
PR Number
#54285
Merged At
Sep 24, 2026, 3:00:48 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#54284
Merged At
Sep 24, 2026, 2:58:58 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54283
Merged At
Sep 24, 2026, 2:59:33 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54282
Merged At
Sep 24, 2026, 2:58:58 AM
Released In
Not yet
Release Date
Not yet

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