Skip to content

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

Closed
@JeromeDeLeon

Description

@JeromeDeLeon

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:

  • @testing-library/vue version: 5.4.1
  • Vue version: 2.6.11
  • node version: 12.19.0
  • npm (or yarn) version: 6.14.8

Relevant code or config (if any)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas PRThere's an open PR to solve/close the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions