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
importReactfrom'react';import{TextInput}from'react-native'import{render,fireEvent}from'@testing-library/react-native';import{useForm}from'react-hook-form';constTextInputWithForm=()=>{const{ result }=useForm()return<TextInput/>}describe('Test',()=>{it('should pass sample test',()=>{const{ getByDisplayValue }=render(<TextInputWithForm/>);});});
Expected behaviour
Should pass the test normally.
What browsers are you seeing the problem on?
None, this is a Jest issue.
Relevant log output
ReferenceError: FileList is not defined
5 |
6 | const TextInputWithForm = () => {
> 7 | const { result } = useForm()
| ^
8 |return<TextInput />
9 | }
10 |
at data (node_modules/react-hook-form/src/utils/cloneObject.ts:15:26)
at mount (node_modules/react-hook-form/src/logic/createFormControl.ts:125:5)
at formState (node_modules/react-hook-form/src/useForm.ts:76:26)
This discussion was converted from issue #10540 on June 14, 2023 22:14.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
Version Number
7.44.3
Codesandbox/Expo snack
Cannot
Steps to reproduce
Create a test file like this and run it
Expected behaviour
Should pass the test normally.
What browsers are you seeing the problem on?
None, this is a Jest issue.
Relevant log output
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions