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
I need to assert that my api is receiving the correct files. In this minimal reproduction it might not make sense because it's like I am testing DOM, but in my real world scenario the form is more complex and in that context this test makes sense.
What happened:
when I call expect(api).toHaveBeenCalledWith({name: "hello.txt", file: file})
I receive {name: "", file: {}}.
Basically I am unable to assert what file was passed in the function.
Thank you.
The text was updated successfully, but these errors were encountered:
MatanBobi
transferred this issue from testing-library/react-testing-library
Mar 22, 2024
It looks like the input is getting the data (as can be seen in the reproduction, the input assertion is passing) but the Form itself isn't updated with that data.
Environment
@testing-library/react
version: 14.2.1react-scripts
version: 5.0.1jsdom
fromreact-scripts
Reproduction:
Minimal reproduction on CodeSandbox: here
What you did:
I need to assert that my api is receiving the correct files. In this minimal reproduction it might not make sense because it's like I am testing DOM, but in my real world scenario the form is more complex and in that context this test makes sense.
What happened:
when I call
expect(api).toHaveBeenCalledWith({name: "hello.txt", file: file})
I receive
{name: "", file: {}}
.Basically I am unable to assert what file was passed in the function.
Thank you.
The text was updated successfully, but these errors were encountered: