jameslnewell / xhr-mock

Utility for mocking XMLHttpRequest.
196 stars 48 forks source link

Unclear how to test upload progress #82

Open bopfer opened 5 years ago

bopfer commented 5 years ago

The example in the docs works for emitting a single progress event at progress 0. But, I can't find any way to emit and test multiple events up to 100% done.

Is this possible? Anyone have examples?

jameslnewell commented 5 years ago

The example should print both 0 and 100%?

I had planned for multiple progress events being dispatched between 0 and 100 but I haven't got around to implementing it yet sorry. PRs are welcome!