Skip to content

Conversation

matux
Copy link
Contributor

@matux matux commented Jun 5, 2025

Description of the change

This PR migrates the server test rollbar to mocha from vows.

The server.rollbar test file was gigantic. I've broken it into multiple parts and added a small utility file with the shared stuff (just a couple dozen lines).

Related issues

SDK-490/migrate-vowsjs-to-mocha
SDK-491/complete-server-test-es-module-migration

@matux matux requested a review from Copilot June 5, 2025 21:36
@matux matux self-assigned this Jun 5, 2025
Copy link
Contributor

@Copilot 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 migrates the server Rollbar tests from vows to mocha and updates related test utilities and coverage for telemetry, logging, exception handling, and configuration.

  • Removed custom process.env setup in some tests
  • Added new mocha-based test files covering Rollbar telemetry, logging, handler behavior, constructor configuration, and lambda scenarios

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/server.telemetry.mocha.test.js Removed process.env assignment and converted telemetry tests to mocha syntax
test/server.rollbar.test-utils.js Introduced common test utilities for use across server Rollbar tests
test/server.rollbar.misc.mocha.test.js Added miscellaneous tests for Rollbar methods
test/server.rollbar.logging.mocha.test.js Added logging tests with various option combinations and callbacks
test/server.rollbar.handlers.mocha.test.js Added tests for exception and rejection handling with uncaught and unhandled rejections
test/server.rollbar.constructor.mocha.test.js Added tests ensuring proper constructor behavior, configuration, and tracer setup
test/server.lambda.mocha.test.js Migrated lambda tests to mocha removing extraneous environment variable setup

@matux matux force-pushed the matux/vows-to-mocha-4 branch 3 times, most recently from 5cbb86f to df2775f Compare June 6, 2025 23:41
Base automatically changed from matux/vows-to-mocha-4 to master June 6, 2025 23:43
@matux matux force-pushed the matux/vows-to-mocha-5 branch from 291f8dd to d9a234c Compare June 6, 2025 23:45
@matux matux enabled auto-merge (squash) June 6, 2025 23:46
@matux matux merged commit 8c1f5c3 into master Jun 6, 2025
4 checks passed
@matux matux deleted the matux/vows-to-mocha-5 branch June 6, 2025 23:47
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