Repository navigation
Conversation
Adds a Vitest config that runs test/client.test.ts in Hermes on an iOS simulator, and a CI job for it. Not expected to pass.
…ror-reporting fix
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.
An experiment, not meant to merge: it shows that the existing
test/client.test.tscan run on React Native without changes to the tests, and what it reports. The suite is expected to fail.vitest-pool-react-nativebundles the test file andsrc/with Metro and runs them in Hermes in a stock React Native app on an iOS simulator.vitest.react-native.config.tsreuses the shared config and the standalone test server from the Node suite.test:react-nativeruns it locally and a newTest: React Native (iOS)job runs it in CI.The only change to existing code is adding
'react-native'to theSuitetype intest/helpers/env.ts.What to review:
127.0.0.1, and the pool only forwards Metro's port, so Android would fail for reasons unrelated to the library.feat/action-config-input), because the action had no way to pick a config file. It should move to@mainonce that is merged.What CI showed so far:
vite/dist/node/module-runner.js, becausetest/helpers/env.tsimportsinjectfromvitest. Listing it in the pool'stestHelpersfixed that.injectsupport (vitest-pool-react-native 2.1.0) and had to report errors thrown while a module loads (fix: report errors thrown while a module loads rexxars/vitest-pool-react-native#14). Without that, a throwing import showed up as a timeout on Android and an undefinedEventSourceon iOS.ReferenceError: Property 'EventTarget' doesn't existatsrc/EventSource.ts:183, whereEventSourceImpl extends EventTarget. Hermes in React Native 0.81.5 has no globalEventTarget.test/client.test.tsalso usesvi.stubGlobal(the pool's runner doesn't exportvi) andDOMException(not available in React Native), andfetchresponse streaming is untested so far.