You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to provide async support to the withReanimatedTimer wrapper?
I have a test environment using @testing-library/react-native. I want to test a screen that has an async call to a server, rendering a loading spinner until the Promise completes. I then want to test that the animation on that screen displays correctly. However using async at present a withReanimatedTimer wrapper like so:
withReanimatedTimer( async () => {
put tests in here
})
just incorrectly passes the tests.
At present I believe my only alternative is to mock the whole process of loading. This means I start with the screen complete with information which wont capture the whole process.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it possible to provide async support to the withReanimatedTimer wrapper?
I have a test environment using @testing-library/react-native. I want to test a screen that has an async call to a server, rendering a loading spinner until the Promise completes. I then want to test that the animation on that screen displays correctly. However using async at present a withReanimatedTimer wrapper like so:
just incorrectly passes the tests.
At present I believe my only alternative is to mock the whole process of loading. This means I start with the screen complete with information which wont capture the whole process.
Beta Was this translation helpful? Give feedback.
All reactions