testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 110 forks source link

Can't use `fireEvent.update` on input file #177

Closed JeromeDeLeon closed 3 years ago

JeromeDeLeon commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

Since the arrival of fireEvent.update and warning we are somehow forced to update the test to use it, but the problem is that it doesn't have support for input file making our tests fail when trying to use that new API but getting a warning when using input or change event type.

To Reproduce Steps to reproduce the behavior:

  1. Create a component with an input file in it.
  2. Test it with fireEvent.update

Expected behavior

I expected it to accept fileList or array of mock file like what we're using { target: { files: [mockFile] } } or from what I found from this PR

Screenshots

Related information:

Relevant code or config (if any)

Additional context

afontcu commented 3 years ago

Hi! Can you provide a failing test?

afontcu commented 3 years ago

Fixed in #179