Multiple test and test utils migrations to TS#1447
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
.tsextensions instead of.jsfor 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.tsto a centralizedtest/index.tsfile
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.
e080121 to
7b3ef9b
Compare
1fa28a7 to
0e36bd6
Compare
0e36bd6 to
0773bd6
Compare
waltjones
approved these changes
Nov 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
.tsextensions instead of.jsfor test utilities and fixtureslocals.fixtures,payloads.fixtures,rrwebEvents.fixtures, etc.) to TypeScriptbrowser.rollbar.test-utils.tsto a centralizedtest/index.tsfile