-
Notifications
You must be signed in to change notification settings - Fork 946
check client offline state and test #6579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
if (!canUseNetwork(remoteStore)) { | ||
logDebug( | ||
LOG_TAG, | ||
'The network is disabled. The task returned by ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
@@ -38,4 +39,23 @@ apiDescribe('Aggregation query', (persistence: boolean) => { | |||
expect(snapshot.getCount()).to.equal(3); | |||
}); | |||
}); | |||
|
|||
it('getAggregateFromServerDirect fails if user is offline async', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "async" mean in this test name? Can we just remove that word?
@@ -38,4 +39,23 @@ apiDescribe('Aggregation query', (persistence: boolean) => { | |||
expect(snapshot.getCount()).to.equal(3); | |||
}); | |||
}); | |||
|
|||
it('getAggregateFromServerDirect fails if user is offline async', () => { | |||
const testDocs = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.