Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

files(e) logic seems to be incorrect for testing #59

Open
kevinansfield opened this issue Nov 22, 2017 · 1 comment
Open

files(e) logic seems to be incorrect for testing #59

kevinansfield opened this issue Nov 22, 2017 · 1 comment

Comments

@kevinansfield
Copy link

The files(e) conditional appears to be in the wrong order for testing because e.target.files will be an empty FileList which is truthy so the testingFiles branches are never reached.

I changed the behaviour in an override component to the following which is working fine for me but I may have missed something:

files(e) {
    return (e.originalEvent || e).testingFiles || e.target.files;
}
@cowboyd
Copy link
Collaborator

cowboyd commented Nov 27, 2017

If you've gotten it working, where it wasn't working before, will be happy to integrate it into the upstream codebase!

I'm not seeing a test-case for the test helper.... bummer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants