test: Cover await_write_finish that debounces events (#1402)
test: Cover await_write_finish that debounces events (#1402)

We agreed on merging this PR and do some refactoring later to use Buffer#isEmpty().

Heuristic to check emptyness:
By adding a specific event at the end of the queue
and by checking this is the event we receive when
we pop() the last event, we can admit this is a
heuristic that check the buffer is empty.


cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop