Testing live queries
I've got some hooks that do live queries against multiple collections and I'd like to replace the actual queryCollections with localOnly collections for tests.
The issue im running into is the collections are singletons in the application and the vi module mocks are not resetting between tests.
An afterEach(() => collection.cleanup()) is also failing because of the live queries themselves.
Does anyone have any advice on how to approach testing this? I didnt really want to mock out the queries made by the collections (but if thats the wisdom, so be it)
The issue im running into is the collections are singletons in the application and the vi module mocks are not resetting between tests.
An afterEach(() => collection.cleanup()) is also failing because of the live queries themselves.
Does anyone have any advice on how to approach testing this? I didnt really want to mock out the queries made by the collections (but if thats the wisdom, so be it)