Skip to content

Conversation

TrevorBurnham
Copy link

This commit fixes test failures observed under macOS and Node.js 22 and adds a CI job to run the tests in an environment that uses both.

Problem

The test suite was experiencing critical issues on macOS with Node.js 22:

  1. Test Process Hanging: Tests would hang indefinitely after reporting results due to a broken child process exit handler in ts-mocha.
  2. Resource Leaks: Some tests weren't properly disposing of LSP connections, contributing to hanging issues.
  3. Platform-Specific Failures: The webworker test was failing due to proxyquire incompatibility with Node.js 22's ES module handling.

Solution

1. Test Runner Replacement

  • Replaced ts-mocha with direct mocha + ts-node/register + --exit flag
  • Eliminates the problematic child process handling in ts-mocha
  • Ensures clean process termination while maintaining identical functionality

2. Resource Cleanup Improvements

  • Auth Tests: Added proper afterEach cleanup to dispose LSP connections

3. Node.js 22 Compatibility

  • Webworker Tests: Replaced proxyquire (incompatible with Node.js 22 ES modules) with direct sinon stubbing

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit fixes test failures observed under macOS and Node.js 22 and
adds a CI job to test in an environment that uses both.
@TrevorBurnham TrevorBurnham requested a review from a team as a code owner August 24, 2025 20:57
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.

1 participant