mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
28ed660c2d
Summary: The current test failures don't include the values passed to `EXPECT` which makes it difficult to understand if the test ended earlier or later then expected. ``` Failure: Value of: (commitDuration >= 1000 - threshold) && (commitDuration <= 1000 + threshold) Actual: false Expected: true ``` This diff uses the gtest `EXPECT_NEAR` to get exception messages including the delta: ``` Failure: The difference between telemetryDurationToMilliseconds(telemetry.getTextMeasureTime()) and 600 is 153, which exceeds threshold, where telemetryDurationToMilliseconds(telemetry.getTextMeasureTime()) evaluates to 753, 600 evaluates to 600, and threshold evaluates to 70. ``` This doesn't change the test's flakiness because of how sleep is implemented. Changelog: [Internal] Test only change Reviewed By: sammy-SC Differential Revision: D27595206 fbshipit-source-id: f31bdd92ecc7271c9491dda18639ea08820f5730