software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.59k stars 1.26k forks source link

Tests of `withDelay` #6150

Closed Latropos closed 3 days ago

Latropos commented 1 week ago

Summary

Tests of withDelay consist may look a bit complicated, because they contain a bit more logic than other tests. It's because I want to make very peculiar snapshot tests that verify, if withDelay modifier really keeps the same animation. So I compare snapshots of animations with and withoutDelay, and they should be the same (except for some static animation at the beginning).

This way it should be very quick easy to add more tests if we spot and fix some specific bug related to this animation modifier.

One test case is commented out, as it doesn't pass - we have more than one frame of unexpeced delay when using withDelay animation modifier.

Test plan