check client offline state and test#6579
Conversation
|
| if (!canUseNetwork(remoteStore)) { | ||
| logDebug( | ||
| LOG_TAG, | ||
| 'The network is disabled. The task returned by ' + |
There was a problem hiding this comment.
This debug message is somewhat misleading. First, the getAggregateFromServerDirect() function is going to be renamed. Second, it implies that the promise will be automatically resolved once network connectivity is restored. What do you think about just removing this log message altogether?
| }); | ||
| }); | ||
|
|
||
| it('getAggregateFromServerDirect fails if user is offline async', () => { |
There was a problem hiding this comment.
What does "async" mean in this test name? Can we just remove that word?
| }); | ||
|
|
||
| it('getAggregateFromServerDirect fails if user is offline async', () => { | ||
| const testDocs = { |
There was a problem hiding this comment.
Can we just use an empty collection here? I don't think it matters how many documents are present in the collection, and, if that is the case, then populating the collection somewhat implies that the contents of the collection are meaningful.
Uh oh!
There was an error while loading. Please reload this page.