Open cjduncana opened 1 month ago
https://codesandbox.io/p/sandbox/test-file-upload-xtg77s
The file input should have the uploaded file.
The onChange event is not triggered, and the file input doesn't have the uploaded file.
onChange
^14.1.1
No response
The problem lies in the isAcceptableFile function. After splitting the string by its commas, it doesn't trim the whitespace, so some valid comma-separated tokens fail this test.
isAcceptableFile
It's my first time contributing to this project. Once I have time, I can look into how to write an MR following your standards.
Reproduction example
https://codesandbox.io/p/sandbox/test-file-upload-xtg77s
Prerequisites
Expected behavior
The file input should have the uploaded file.
Actual behavior
The
onChange
event is not triggered, and the file input doesn't have the uploaded file.User-event version
^14.1.1
Environment
No response
Additional context
The problem lies in the
isAcceptableFile
function. After splitting the string by its commas, it doesn't trim the whitespace, so some valid comma-separated tokens fail this test.