Skip to content

chore: updating test files to not break when node is in v24#1434

Open
joker23 wants to merge 1 commit into
mainfrom
skz/sdk-2193/typescript-6-node-24
Open

chore: updating test files to not break when node is in v24#1434
joker23 wants to merge 1 commit into
mainfrom
skz/sdk-2193/typescript-6-node-24

Conversation

@joker23

@joker23 joker23 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Node v24 makes os.platform immutable which causes the spyOn to fail.


Note

Low Risk
Test-only changes with no production code paths affected.

Overview
Updates Electron and server-node platform info tests so they run on Node v24, where os.platform (and related APIs) are no longer spyable with jest.spyOn.

Both test files now jest.mock('os') with jest.fn() stand-ins for the os methods under test, beforeEach restores real implementations for tests that use the live OS, and the mock-data suites set mockReturnValue instead of spies. Mock suites also add afterEach(jest.clearAllMocks). Production SDK code is unchanged.

Reviewed by Cursor Bugbot for commit 4828bca. Bugbot is set up for automated code reviews on this repo. Configure here.

Node v24 makes `os.platform` immutable which causes the `spyOn` to fail.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@joker23

joker23 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4828bca. Configure here.

@joker23 joker23 marked this pull request as ready for review June 8, 2026 21:16
@joker23 joker23 requested a review from a team as a code owner June 8, 2026 21:16

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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