Skip to content

Comments

perf: Fix worker test execution excessive delay#287

Merged
nev21 merged 1 commit intomainfrom
nev21/TestPerf
Feb 22, 2026
Merged

perf: Fix worker test execution excessive delay#287
nev21 merged 1 commit intomainfrom
nev21/TestPerf

Conversation

@nev21
Copy link
Contributor

@nev21 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).

@nev21 nev21 added this to the 0.1.8 milestone Feb 22, 2026
@nev21 nev21 requested review from a team as code owners February 22, 2026 00:36
Copilot AI review requested due to automatic review settings February 22, 2026 00:36
@nev21 nev21 enabled auto-merge (squash) February 22, 2026 00:36
@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.29%. Comparing base (363bc9f) to head (776113f).
⚠️ Report is 1 commits behind head on main.

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     

see 137 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
Contributor

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

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

Copy link
Contributor

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 24 out of 27 changed files in this pull request and generated 4 comments.

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

- 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).
@nev21 nev21 enabled auto-merge (squash) February 22, 2026 01:06
Copy link
Contributor

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 24 out of 27 changed files in this pull request and generated no new comments.

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

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 033b1d1 into main Feb 22, 2026
15 checks passed
@nev21 nev21 deleted the nev21/TestPerf branch February 22, 2026 01: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