Skip to content

Comments

perf: Fix worker test execution excessive delay#453

Merged
nev21 merged 1 commit intomainfrom
nev21/testPerf
Feb 24, 2026
Merged

perf: Fix worker test execution excessive delay#453
nev21 merged 1 commit intomainfrom
nev21/testPerf

Conversation

@nev21
Copy link
Contributor

@nev21 nev21 commented Feb 24, 2026

  • add shared worrker adapter/runner
  • switch worker Karma to mocha + karma-typescript and update globs
  • drop unused karma-* deps and refresh rush shrinkwrap

Copilot AI review requested due to automatic review settings February 24, 2026 07:24
@nev21 nev21 requested review from a team as code owners February 24, 2026 07:24
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.56%. Comparing base (e8597e9) to head (f99a960).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
- Coverage   99.03%   97.56%   -1.47%     
==========================================
  Files          19       27       +8     
  Lines         727     1439     +712     
  Branches      183      339     +156     
==========================================
+ Hits          720     1404     +684     
- Misses          7       35      +28     

see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes worker test execution performance by replacing the slow karma-mocha-webworker + rollup setup with a faster karma-typescript-based approach using custom worker adapter and runner scripts.

Changes:

  • Switched worker tests from karma-mocha-webworker + rollup preprocessor to mocha + karma-typescript with custom worker adapter/runner
  • Added environment-specific test files to validate test execution contexts (browser, node, worker)
  • Removed unnecessary dependencies (karma-coverage, karma-coverage-istanbul-reporter, karma-mocha-webworker, karma-rollup-preprocessor) and removed NODE_OPTIONS memory limit workaround

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/test/src/worker/isWorker.test.ts New test to validate worker environment detection
lib/test/src/node/isNode.test.ts New test to validate Node environment detection
lib/test/src/browser/isBrowser.test.ts New test to validate browser environment detection
lib/package.json Updated test scripts with proper glob patterns and removed unused karma dependencies
lib/karma.worker.conf.js Completely refactored to use karma-typescript instead of rollup for faster compilation
lib/karma.debug.worker.conf.js Refactored debug configuration with karma-typescript and updated browser launcher settings
lib/karma.browser.conf.js Updated file glob to exclude worker and node tests
common/test/worker-adapter.js New adapter that runs in main page context to coordinate worker test execution
common/test/worker-test-runner.js New runner that executes tests inside Web Worker context
common/config/rush/npm-shrinkwrap.json Updated lockfile reflecting dependency changes and version updates
.gitignore Removed browser/ directory entry (no longer generated)
Files not reviewed (1)
  • common/config/rush/npm-shrinkwrap.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- add shared worrker adapter/runner
- switch worker Karma to mocha + karma-typescript and update globs
- drop unused karma-* deps and refresh rush shrinkwrap
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • common/config/rush/npm-shrinkwrap.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nev21 nev21 enabled auto-merge (squash) February 24, 2026 07:49
Copy link
Contributor

@nevware21-bot nevware21-bot left a comment

Choose a reason for hiding this comment

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

Approved by nevware21-bot

@nev21 nev21 merged commit 2bfb808 into main Feb 24, 2026
13 of 14 checks passed
@nev21 nev21 deleted the nev21/testPerf branch February 24, 2026 08:30
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.

2 participants