Skip to content

Fixed: make renderer Jest tests self-declare their runner#21854

Closed
Sewer56 wants to merge 1 commit intomasterfrom
explicit-jest-globals
Closed

Fixed: make renderer Jest tests self-declare their runner#21854
Sewer56 wants to merge 1 commit intomasterfrom
explicit-jest-globals

Conversation

@Sewer56
Copy link
Copy Markdown
Member

@Sewer56 Sewer56 commented Mar 25, 2026

Renderer Jest tests were relying on ambient globals (describe, it, expect, etc.), which caused TypeScript/LSP errors in editors for files outside the main tsconfig.json include scope.

This switches those tests to explicitly import from @jest/globals, fixing LSP errors for files that weren't cleanly moved over to Vitest.

Changes:

  • Added @jest/globals dependency to the renderer workspace
  • Updated 4 renderer Jest test files with explicit imports
  • Replaced bare jest global access in NotificationAggregator.ts with a globalThis-based check
  • Ran oxfmt on all changed files
  • Validated: focused Jest run passes (4 suites, 107 tests), renderer typecheck passes

Renderer Jest tests were relying on ambient globals (describe, it,
expect, etc.), which caused TypeScript/LSP errors in editors for
files outside the main tsconfig.json include scope.

This switches those tests to explicitly import from @jest/globals,
fixing LSP errors for files that weren't cleanly moved over to Vitest.

Changes:
- Added @jest/globals dependency to the renderer workspace
- Updated 4 renderer Jest test files with explicit imports
- Replaced bare jest global access in NotificationAggregator.ts
  with a globalThis-based check
- Ran oxfmt on all changed files
- Validated: focused Jest run passes (4 suites, 107 tests),
  renderer typecheck passes
@github-actions
Copy link
Copy Markdown

This PR has conflicts. You need to rebase the PR before it can be merged.

@erri120
Copy link
Copy Markdown
Member

erri120 commented Apr 1, 2026

Obsolete after #22081.

@erri120 erri120 closed this Apr 1, 2026
@erri120 erri120 deleted the explicit-jest-globals branch April 1, 2026 07:24
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