Skip to content

Commit

Permalink
test: assert correct number of connected devices
Browse files Browse the repository at this point in the history
In [#872], we observed a bug where we seemingly had the wrong number of
remote sync states. This adds a test assertion that we have the right
number.

[#872]: #872
  • Loading branch information
EvanHahn committed Nov 18, 2024
1 parent 9cfdd0c commit 386163b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test-e2e/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,12 @@ test('Correct sync state prior to data sync', async function (t) {
managers.map((m) => m.getProject(projectId))
)

for (const project of projects) {
const { remoteDeviceSyncState } = project.$sync.getState()
const otherDeviceCount = Object.keys(remoteDeviceSyncState).length
assert.equal(otherDeviceCount, COUNT - 1)
}

const generated = await seedDatabases(projects, { schemas: ['observation'] })
await waitForSync(projects, 'initial')

Expand Down

0 comments on commit 386163b

Please sign in to comment.