perf: Fix worker test execution excessive delay#287
Merged
Conversation
Contributor
nev21
commented
Feb 22, 2026
- Switch worker tests to mocha + karma-typescript with adapter/runner flow and suite-aware reporting.
- Normalize browser/worker test globs and coverage exclusions to reduce noise.
- Add environment sanity tests for browser/node/worker and rename iterable expect test to .test.ts.
- Update test scripts, remove rollup preprocessor usage, and align dev deps to the new setup.
- Minor config tweaks (typedoc grouping, tsconfig settings).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #287 +/- ##
==========================================
+ Coverage 92.87% 95.29% +2.42%
==========================================
Files 78 137 +59
Lines 3564 6313 +2749
Branches 904 1616 +712
==========================================
+ Hits 3310 6016 +2706
- Misses 254 297 +43 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the test infrastructure to eliminate excessive delays in worker test execution by switching worker runs to a mocha + karma-typescript flow with a custom adapter/runner, while also normalizing test file globs and coverage exclusions across node/browser/worker.
Changes:
- Reworks worker Karma configs to use mocha + karma-typescript and a custom worker adapter/runner for suite-aware reporting.
- Normalizes node/browser/worker test globs and coverage exclusions; adds environment sanity tests.
- Adjusts package scripts/dev-deps and minor config tweaks (TypeDoc grouping, tsconfig).
Reviewed changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| shim/chai/typedoc.json | Adjusts TypeDoc group ordering (adds “Assert”). |
| shim/chai/test/tsconfig.worker.karma.json | Tweaks worker Karma TS compiler options (disables declarations). |
| shim/chai/test/src/worker/isWorker.test.ts | Adds worker environment sanity test for chai shim package. |
| shim/chai/test/src/node/isNode.test.ts | Adds node environment sanity test for chai shim package. |
| shim/chai/test/src/chai/chaiAssert.test.ts | Updates imports for chai assert tests (uses internal chaiAssert and corrected bootstrap path). |
| shim/chai/test/src/browser/isBrowser.test.ts | Adds browser environment sanity test for chai shim package. |
| shim/chai/package.json | Updates test scripts/globs and devDependencies to match new Karma worker setup. |
| shim/chai/karma.worker.conf.js | Switches worker tests to mocha + karma-typescript and wires in worker adapter/runner + coverage reporting. |
| shim/chai/karma.debug.worker.conf.js | Updates worker debug config for the new adapter/runner flow. |
| shim/chai/karma.debug.browser.conf.js | Excludes node/worker tests from browser debug runs. |
| shim/chai/karma.browser.conf.js | Excludes node/worker tests from browser runs; adjusts preprocessors and coverage exclusions. |
| core/test/src/worker/isWorker.test.ts | Adds worker environment sanity test for core package. |
| core/test/src/operations/includeOp.edgeCases.test.ts | Removes an unused import. |
| core/test/src/node/isNode.test.ts | Adds node environment sanity test for core package. |
| core/test/src/browser/isBrowser.test.ts | Adds browser environment sanity test for core package. |
| core/test/src/assert/expect.isIterable.test.ts | Adds iterable/not-iterable tests for expect. |
| core/package.json | Updates test scripts and devDependencies; removes some packages. |
| core/karma.worker.conf.js | Switches worker tests to mocha + karma-typescript and wires in worker adapter/runner + coverage reporting. |
| core/karma.debug.worker.conf.js | Updates worker debug config for the new adapter/runner flow (includes additional documentation). |
| core/karma.debug.browser.conf.js | Excludes node/worker tests from browser debug runs. |
| core/karma.browser.conf.js | Excludes node/worker tests from browser runs. |
| common/test/worker-test-runner.js | Adds worker-side runner to load wrappers/entrypoints and report results/coverage back to Karma. |
| common/test/worker-adapter.js | Adds main-page adapter to intercept mocha.run(), spin up a worker, and bridge results/coverage to Karma. |
| common/config/rush/npm-shrinkwrap.json | Updates shrinkwrap for dependency/script changes and removals. |
| .gitignore | Stops ignoring the root browser/ directory. |
Files not reviewed (1)
- common/config/rush/npm-shrinkwrap.json: Language not supported
add527e to
926597d
Compare
- Switch worker tests to mocha + karma-typescript with adapter/runner flow and suite-aware reporting. - Normalize browser/worker test globs and coverage exclusions to reduce noise. - Add environment sanity tests for browser/node/worker and rename iterable expect test to .test.ts. - Update test scripts, remove rollup preprocessor usage, and align dev deps to the new setup. - Minor config tweaks (typedoc grouping, tsconfig settings).
926597d to
776113f
Compare
nevware21-bot
approved these changes
Feb 22, 2026
Contributor
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-bot
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.