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 your feature request related to a problem? Please describe.
Not really a problem but when declaring a scenario and using screen as the scenario param instead of importing it from testing-library, I would like to have proper types for it.
I tried:
import{measurePerformance,MeasureOptions}from'reassure';import{fireEvent}from'@testing-library/react-native';import{ComponentUnderTest}from'./ComponentUnderTest';test('Test with scenario',async()=>{constscenario: MeasureOptions['scenario']=async(screen)=>{fireEvent.press(screen.getByText('Go'));awaitscreen.findByText('Done');};awaitmeasureRenders(<ComponentUnderTest/>,{ scenario });});
But MeasureOptions is not available for me to import, and even if it was, I saw the types for scenario just use any for the screen:
Describe the solution you'd like
I can import MeasureOptions and scenario has proper types for the screen param
Describe alternatives you've considered
none
Additional context
I guess this is not a huge problem since it only affects codebases relying on old versions of testing-library where you can not import screen from there... still... seems like a quick fix and a nice improvement for reassure
Using v0.10.2
The text was updated successfully, but these errors were encountered:
You could explicitly type screen as RenderResult from RNTL. The reason why Reassure uses any is that you can also use it with React Testing Library, which has a different type.
Is your feature request related to a problem? Please describe.
Not really a problem but when declaring a scenario and using
screen
as the scenario param instead of importing it fromtesting-library
, I would like to have proper types for it.I tried:
But
MeasureOptions
is not available for me to import, and even if it was, I saw the types for scenario just useany
for thescreen
:Describe the solution you'd like
I can import
MeasureOptions
andscenario
has proper types for the screen paramDescribe alternatives you've considered
none
Additional context
I guess this is not a huge problem since it only affects codebases relying on old versions of testing-library where you can not import
screen
from there... still... seems like a quick fix and a nice improvement forreassure
Using v0.10.2
The text was updated successfully, but these errors were encountered: