How can I test a change handler for a file-type input in React using Jest/Enzyme?
This answers shows how to access all of the different parts of the code using jest. However, it doesn’t necessarily mean that one should test all of these parts this way. The code-under-test is essentially the same as in the question except that I have substituted addEventListener(‘load’, … for onload = …, and I have … Read more