Skip to content

Conversation

@matux
Copy link
Contributor

@matux matux commented Nov 25, 2025

Description of the change

This PR migrates test files and test utilities from JavaScript to TypeScript by updating file extensions and import paths from .js to .ts, and refactors global type declarations for better organization.

Key changes:

  • Updated import paths across test files to reference .ts extensions instead of .js for test utilities and fixtures
  • Migrated fixture files (locals.fixtures, payloads.fixtures, rrwebEvents.fixtures, etc.) to TypeScript
  • Relocated global type declarations from browser.rollbar.test-utils.ts to a centralized test/index.ts file

@matux matux requested a review from Copilot November 25, 2025 00:08
@matux matux self-assigned this Nov 25, 2025
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

This PR migrates test files and test utilities from JavaScript to TypeScript by updating file extensions and import paths from .js to .ts, and refactors global type declarations for better organization.

Key changes:

  • Updated import paths across test files to reference .ts extensions instead of .js for test utilities and fixtures
  • Migrated fixture files (locals.fixtures, payloads.fixtures, rrwebEvents.fixtures, etc.) to TypeScript
  • Relocated global type declarations from browser.rollbar.test-utils.ts to a centralized test/index.ts file

Reviewed changes

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

Show a summary per file
File Description
test/util/timers.ts Updated documentation examples and added TypeScript generics to setTimeout function
test/index.ts New file containing centralized global type declarations for test utilities
test/browser.rollbar.test-utils.ts Removed global type declarations (moved to test/index.ts)
test/fixtures/locals.fixtures.ts Changed variable declaration from var to const
test/fixtures/replay/index.ts Updated imports to use .ts extensions
test/examples/*.test.ts Updated imports for test utilities to use .ts extensions
test/replay/integration/*.test.js Updated fixture imports to use .ts extensions
test/replay/util/mockRecordFn.js Updated fixture imports to use .ts extensions
test/tracing/exporter.toPayload.test.js Updated fixture imports to use .ts extensions
test/server.locals.merge.test.js Updated fixture imports to use .ts extensions
test/browser.*.test.ts Updated timer utility imports to use .ts extensions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@matux matux force-pushed the matux/migrate-test-js-to-ts-3 branch from e080121 to 7b3ef9b Compare November 25, 2025 19:07
Base automatically changed from matux/migrate-test-js-to-ts-3 to master November 25, 2025 20:14
@matux matux force-pushed the matux/migrate-test-js-to-ts-4 branch 2 times, most recently from 1fa28a7 to 0e36bd6 Compare November 25, 2025 20:28
@matux matux force-pushed the matux/migrate-test-js-to-ts-4 branch from 0e36bd6 to 0773bd6 Compare November 25, 2025 20:37
@matux matux merged commit af07767 into master Nov 25, 2025
7 checks passed
@matux matux deleted the matux/migrate-test-js-to-ts-4 branch November 25, 2025 20:43
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