Skip to content

Test component fixture token palette restoration - #335696

Merged
Henning Dieterichs (hediet) merged 1 commit into
mainfrom
hediet/component-fixture-palette-restoration
Sep 11, 2026
Merged

Test component fixture token palette restoration#335696
Henning Dieterichs (hediet) merged 1 commit into
mainfrom
hediet/component-fixture-palette-restoration

Conversation

@hediet

Copy link
Copy Markdown
Member

Follow-up to #335568.\n\nThis installs a distinct valid sentinel token color map before acquiring the shared fixture tokenizers, verifies that disposing the final fixture restores that sentinel, and restores the test process's original palette in a finally block. This exercises the production restoration branch without installing an invalid color map that can crash existing color-map consumers.\n\nValidation:\n- npm run transpile-client\n- npm exec eslint -- src/vs/workbench/test/browser/componentFixtures/fixtureSyntaxHighlighting.test.ts\n- scripts\test.bat --run src\vs\workbench\test\browser\componentFixtures\fixtureSyntaxHighlighting.test.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 11, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test change correctly exercises restoration while reliably preserving global test state.

Review tier: Balanced
Findings: None

What changed in this PR

Adds regression coverage for restoring the shared token palette after fixture tokenizer disposal.

Changes:

  • Installs a valid sentinel color map before tokenizer acquisition.
  • Verifies final disposal restores the sentinel.
  • Restores the original test palette in finally.
File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​fixtureSyntaxHighlighting.test.ts Strengthens palette restoration and test isolation coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 17d6a400 Current: dd3ce8f5

Changed (1)

imageCarousel/imageCarousel/MultipleSections/Dark
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

@saitanallensantiago26-beep

Follow-up to #335568.\n\nThis installs a distinct valid sentinel token color map before acquiring the shared fixture tokenizers, verifies that disposing the final fixture restores that sentinel, and restores the test process's original palette in a finally block. This exercises the production restoration branch without installing an invalid color map that can crash existing color-map consumers.\n\nValidation:\n- npm run transpile-client\n- npm exec eslint -- src/vs/workbench/test/browser/componentFixtures/fixtureSyntaxHighlighting.test.ts\n- scripts\test.bat --run src\vs\workbench\test\browser\componentFixtures\fixtureSyntaxHighlighting.test.ts

  • [ ]

@hediet
Henning Dieterichs (hediet) merged commit 862bd83 into main Sep 11, 2026
34 checks passed
@hediet
Henning Dieterichs (hediet) deleted the hediet/component-fixture-palette-restoration branch September 11, 2026 12:38
@vs-code-engineering vs-code-engineering Bot added this to the 1.139.0 milestone Sep 11, 2026
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.

4 participants