Fixed: make renderer Jest tests self-declare their runner#21854
Closed
Fixed: make renderer Jest tests self-declare their runner#21854
Conversation
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
|
This PR has conflicts. You need to rebase the PR before it can be merged. |
Member
|
Obsolete after #22081. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renderer Jest tests were relying on ambient globals (
describe,it,expect, etc.), which caused TypeScript/LSP errors in editors for files outside the maintsconfig.jsoninclude 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:
@jest/globalsdependency to the renderer workspacejestglobal access inNotificationAggregator.tswith aglobalThis-based checkoxfmton all changed files