Add Fantom integration tests for core public APIs (#57466)#57466
Open
rubennorte wants to merge 1 commit into
Open
Add Fantom integration tests for core public APIs (#57466)#57466rubennorte wants to merge 1 commit into
rubennorte wants to merge 1 commit into
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110784436. |
Summary: Adds Fantom `-itest.js` coverage for maintained, public React Native APIs that were previously untested or thinly tested, driving both the JavaScript logic and the underlying cross-platform C++ through the public `react-native` package surface. New test files: - `Animated/__tests__/SpringAnimation-itest.js`, `DecayAnimation-itest.js`, `AnimatedColor-itest.js`, `AnimatedComposition-itest.js` — spring/decay animations (JS and native driver), `Animated.Color` value semantics, and the composition nodes (`add`/`subtract`/`multiply`/`divide`/`modulo`/`diffClamp`/tracking). - `Components/View/__tests__/View-nativeCSSParsing-itest.js` — string-valued CSS (color functions, transform, gradients) parsed via native CSS parsing. - `Pressability/__tests__/Pressability-touch-itest.js` — press in/out/press, long press, press delay, and responder termination via touch events and the deterministic timer mock. - `Interaction/__tests__/PanResponder-itest.js` — grant/move/release/terminate and gesture state across touch sequences. - `LayoutAnimation/__tests__/LayoutAnimation-itest.js` — `configureNext`/`create`/presets applying the resulting layout. - `Network/__tests__/Network-itest.js` — synchronous `XMLHttpRequest` lifecycle and validation. Extended test files: - `Components/TextInput/__tests__/TextInput-itest.js` — `onSelectionChange`/`onSubmitEditing`/`onKeyPress`/`onEndEditing` events. - `Lists/__tests__/FlatList-itest.js` — `onViewableItemsChanged` via `viewabilityConfig` and `viewabilityConfigCallbackPairs`. - `Text/__tests__/Text-itest.js` — `letterSpacing`, `lineHeight`, and `fontVariant` styles. The JS-driver decay test asserts that the animation completes (which exercises `onUpdate`) rather than asserting per-frame movement, since the `requestAnimationFrame`-based decay does not expose stable intermediate frame values under the test runner's virtual clock. This is a test-only change with no runtime or user-facing impact. Changelog: [Internal] Differential Revision: D110784436
4e44ec3 to
b4a4ac8
Compare
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.
Summary:
Adds Fantom
-itest.jscoverage for maintained, public React Native APIs that were previously untested or thinly tested, driving both the JavaScript logic and the underlying cross-platform C++ through the publicreact-nativepackage surface.New test files:
Animated/__tests__/SpringAnimation-itest.js,DecayAnimation-itest.js,AnimatedColor-itest.js,AnimatedComposition-itest.js— spring/decay animations (JS and native driver),Animated.Colorvalue semantics, and the composition nodes (add/subtract/multiply/divide/modulo/diffClamp/tracking).Components/View/__tests__/View-nativeCSSParsing-itest.js— string-valued CSS (color functions, transform, gradients) parsed via native CSS parsing.Pressability/__tests__/Pressability-touch-itest.js— press in/out/press, long press, press delay, and responder termination via touch events and the deterministic timer mock.Interaction/__tests__/PanResponder-itest.js— grant/move/release/terminate and gesture state across touch sequences.LayoutAnimation/__tests__/LayoutAnimation-itest.js—configureNext/create/presets applying the resulting layout.Network/__tests__/Network-itest.js— synchronousXMLHttpRequestlifecycle and validation.Extended test files:
Components/TextInput/__tests__/TextInput-itest.js—onSelectionChange/onSubmitEditing/onKeyPress/onEndEditingevents.Lists/__tests__/FlatList-itest.js—onViewableItemsChangedviaviewabilityConfigandviewabilityConfigCallbackPairs.Text/__tests__/Text-itest.js—letterSpacing,lineHeight, andfontVariantstyles.The JS-driver decay test asserts that the animation completes (which exercises
onUpdate) rather than asserting per-frame movement, since therequestAnimationFrame-based decay does not expose stable intermediate frame values under the test runner's virtual clock.This is a test-only change with no runtime or user-facing impact.
Changelog:
[Internal]
Differential Revision: D110784436