Skip to content

Fix hanging tests and expand WTR migration#1295

Merged
matux merged 6 commits into
matux/wtrfrom
matux/more-wtr
Aug 28, 2025
Merged

Fix hanging tests and expand WTR migration#1295
matux merged 6 commits into
matux/wtrfrom
matux/more-wtr

Conversation

@matux

@matux matux commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Caution

This PR is being merged into a feature branch: matux/wtr.

This PR also enables the CI for all Pull Requests, not just the ones going to master.

Description of the change

Fixes all hanging tests in Web Test Runner migration and expands coverage: 358 tests passing across 31 test files (~90% of browser tests).

Note

Tests now run in 3.1s vs 24.3s (8x faster)!

Target branch: matux/wtr (feature branch)

Changes

Test Fixes

  • Fixed hanging tests caused by allowUncaught: false in WTR config
  • Replaced Chai v4 expect(false).to.be.ok with assert.fail() and boolean assertions: .eql(true/false).to.be.true/false
  • Fixed Queue.wait() double-callback issue with counter workaround

CI Updates

  • Updated GitHub Actions to use WTR instead of Karma
  • Separated server and browser test runs
  • Added Playwright browser installation step

Testing

npm run test:wtr

@matux matux self-assigned this Aug 28, 2025
@matux matux requested a review from Copilot August 28, 2025 18:27

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.

Pull Request Overview

This PR fixes hanging tests in the Web Test Runner migration and expands test coverage to 358 passing tests across 31 files. The primary changes address test configuration issues and modernize Chai assertions for compatibility with the new test runner.

  • Fixed hanging tests by changing allowUncaught from true to false in WTR config
  • Updated Chai assertions from legacy .equal(true/false) to .be.true/.be.false patterns
  • Replaced problematic expect(false).to.be.ok assertions with assert.fail() calls
  • Fixed Queue.wait() double-callback issue with counter-based workaround

Reviewed Changes

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

Show a summary per file
File Description
web-test-runner.config.mjs Removed exclusions for previously hanging tests and fixed allowUncaught config
test/utility.test.js Updated boolean assertions to use .be.true/.be.false
test/truncation.test.js Modernized Chai assertions and fixed .be() usage
test/tracing/tracing.test.js Updated boolean assertions for span recording state
test/tracing/span.test.js Updated boolean assertions for span recording state
test/telemetry.test.js Fixed .be() usage for boolean assertions
test/queue.test.js Replaced expect(false).to.be.ok with assert.fail() and fixed wait callback issue
test/browser.replay.recorder.test.js Updated boolean assertion for recorder state
.github/workflows/ci.yml Split test runs and added Playwright browser installation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/queue.test.js
Comment thread test/queue.test.js
@matux matux merged commit 36a1995 into matux/wtr Aug 28, 2025
4 checks passed
@matux matux deleted the matux/more-wtr branch August 28, 2025 18:53
matux added a commit that referenced this pull request Sep 8, 2025
* Initial Karma to Web Test Runner migration (#1289)
* Fix hanging tests and expand WTR migration (#1295)
* Migrate example tests for Web Test Runner (#1298)
* Migrate browser transform and core tests for Web Test Runner  (#1299)
* Migrate browser tests from Karma to Web Test Runner (#1300)
* Initial migration of react native tests (#1301)
* Remove Grunt and Karma (#1302)
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.

3 participants