Skip to content

Initial migration of react native tests#1301

Merged
matux merged 1 commit into
matux/wtrfrom
matux/wtr-rn
Sep 8, 2025
Merged

Initial migration of react native tests#1301
matux merged 1 commit into
matux/wtrfrom
matux/wtr-rn

Conversation

@matux

@matux matux commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

Description of the change

React Native tests have been disabled due to multiple issues we won't handle right now:

React native's src/react-native/transport.js is using a 10 year old library Buffer just to get the byteLength of some utf8 data. This library is supposed to be part of node now. Instead of:

import { Buffer } from 'buffer/';

Should be imported as:

import { Buffer } from 'node:buffer';

The other problem is that this dep isn't being added directly, it comes from a devDependency called node-libs-browser which is also extremely old and that I don't believe it's really in use.

Webpack does some magic and ends up shoving buffer in the bundle because it sees it's being used.

All in all, since the tests require a hybrid of node.js and browser environment to run, we need to solve these issues first before we can make these tests play nice with WTR.

That being said, an initial, basic migration has been done which is correct.

These tests will remain disabled for the time being.

Related issues

SDK-493/replace-karma-with-webtest-runner-for-modern-performant-browser

@matux matux self-assigned this Sep 8, 2025
@matux matux merged commit bb53f30 into matux/wtr Sep 8, 2025
4 checks passed
@matux matux deleted the matux/wtr-rn branch September 8, 2025 21:00
matux added a commit that referenced this pull request Sep 8, 2025
* Initial Karma to Web Test Runner migration (#1289)
* Fix hanging tests and expand WTR migration (#1295)
* Migrate example tests for Web Test Runner (#1298)
* Migrate browser transform and core tests for Web Test Runner  (#1299)
* Migrate browser tests from Karma to Web Test Runner (#1300)
* Initial migration of react native tests (#1301)
* Remove Grunt and Karma (#1302)
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