File upload in a dropzone Enzyme Mocha
File upload in a dropzone Enzyme Mocha
How can I test file upload in a dropzone with enzyme and Mocha. In this case I just want to check that state accepted length is bigger than 0 if a file is uploaded but I am not sure how can I mock a file. I am using react-dropzone.
<Dropzone className="dropZoneBox"
onDrop=this.state.accepted.length === 0 ? (accepted) => this.setState( accepted ); : null
style=""
>
<p>-</p>
<p>Only-</p>
</Dropzone>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.