hoodiehq / hoodie-task-client

client api for asynchronous task queue, using PouchDB for sync
Apache License 2.0
2 stars 9 forks source link

Add integration tests for success, error and progress #37

Open gr2m opened 7 years ago

gr2m commented 7 years ago

follow up for #36.

We should add integration tests for the 3 main cases:

  1. Create a task which succeeds
  2. Create a task which errors
  3. Create a task which gets a progress update

I would suggest we mock out @hoodie/store-client using proxyquire for the tests. We can simulate any events we want for the respective cases and can check if the right methods have been called.