TTLabs / EvaporateJS

Javascript library for browser to S3 multipart resumable uploads
1.82k stars 206 forks source link

Simulate upload in storybook/jest #465

Open marcoburrometo opened 3 years ago

marcoburrometo commented 3 years ago

Hello everybody, I would like to emulate an upload in my React project storybook and also in testing (made in jest)

Has anyone found a way to simulate an upload?

jakubzitny commented 3 years ago

Depends on what your implementation looks like. You can use sinon to mock HTTP requests, or mock the Evaporate service in a way that would give you information about what has been called.